Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] How to use Jest #96

Open
bobo-k2 opened this issue Jun 11, 2022 · 2 comments
Open

[Question] How to use Jest #96

bobo-k2 opened this issue Jun 11, 2022 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@bobo-k2
Copy link

bobo-k2 commented Jun 11, 2022

I am wondering if there is a way to use Jest for mocking dependencies instead write custom mock classes and use mockSingleton or mockTransient?

@Suryadeep-bhujel
Copy link

Suryadeep-bhujel commented Dec 25, 2023

I am using jest , vue3 , typescript and inversify-props, jest is for unit testing, while using,
import {container} from "inversify-props"
container.get('ServiceClass')
this is working in project run command "npm run serve"
while I run npm test this is throwing error.

Also I tried to use containerBuilder() but that is no exists in inversify-props but given in documentation to use for testing.

@CKGrafico
Copy link
Owner

This repo is really old and I cannot continue updating without help, I'm sorry.
To be compatible with jest this will need help from a PR

@CKGrafico CKGrafico added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants