You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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() {} })).
The text was updated successfully, but these errors were encountered:
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 welljest.mock('../../someModule', () => ({ getLogLevel() {} }))
.The text was updated successfully, but these errors were encountered: