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

Jest module mocks do not work with this resolver #11

Open
mlippens opened this issue Feb 5, 2018 · 2 comments
Open

Jest module mocks do not work with this resolver #11

mlippens opened this issue Feb 5, 2018 · 2 comments

Comments

@mlippens
Copy link

mlippens commented Feb 5, 2018

I've got an example project here to provide some context. It provides one test that fails with the webpack resolver and succeeds when turning the resolver off. The repository can be found here: https://github.com/mlippens/jest-webpack-resolver-mock-issue.

The issue seems to be the combination of the webpack resolver with jest.mock('../../someModule'), when using the variant of mock using a factory then all is well jest.mock('../../someModule', () => ({ getLogLevel() {} })).

@foleyatwork
Copy link

I'm running into this as well, no leads just yet but I'd love to help come up with a fix.

@vzaidman
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants