Closed grpawel closed 2 years ago
We have jest.config.js that looks somewhat like this:
jest.config.js
module.exports = { rootDir: './', setupFiles: [ '<rootDir>/scripts/someSetupFile.js', ], resolver: 'jest-node-exports-resolver', }
On Windows the resolver is called with path like 'C:/pathToRepo/scripts/someSetupFile.js', which is causing an error:
'C:/pathToRepo/scripts/someSetupFile.js'
Module \/scripts/someSetupFile.js in the setupFiles option was not found. \ is: C:\pathToRepo
An alternative fix would be to wrap everything in try and in catch return defaultResolver.
try
catch
defaultResolver
Thanks, merged :-)
When could we expect the release in npm? :-)
Published as 1.1.6.
We have
jest.config.js
that looks somewhat like this:On Windows the resolver is called with path like
'C:/pathToRepo/scripts/someSetupFile.js'
, which is causing an error:An alternative fix would be to wrap everything in
try
and incatch
returndefaultResolver
.