-
Notifications
You must be signed in to change notification settings - Fork 250
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 rootDir is ignored/replaced #1847
Comments
@michael42 try module.exports = function (config) {
config.set({
mutate: ['src/**/*.ts', '!src/**/*.spec.ts'],
mutator: 'vue',
testRunner: 'jest',
reporters: ['progress', 'clear-text', 'html'],
coverageAnalysis: 'off',
jest: {
rootDir: 'src'
}
});
}; |
Running into this same issue today. @kmdrGroch It appears that when I add that, my jest.config's testEnvironment: '<rootDir>/myFolder' path still does not respect 'src' being the root dir. :( |
I can't tell if this is related: jestjs/jest#8520 (comment) |
My solution was to just avoid using <rootDir> in my jest.config :/ |
Yes, it is specifically issue with Jest, we have had problems with it. So now please hang on and try these workarounds. We have this issue on top of our heads and we will be working on it as soon as we can. |
Is this issue solved? Or can it be closed? |
Seems to be still broken with stryker 4.0.0, here's a more minimal reproduction. Running |
This issue was wrongly lumped in with other jest issues with regards to Thanks for the awesome reproduction @michael42 |
Summary
When setting a custom
rootDir
(i.e.src
) in thejest.config.js
, Stryker seems to override it with the sandbox root path (ignoring the value fromjest.config.js
). This causes files not be found (because thesrc/
prefix is missing).Stryker config
Test runner config
jest.config.js
:Stryker environment
Test runner environment
# stryker run
Your Environment
Add stryker.log
Minimal repository demonstating the issue with stryker 4.0.0: https://github.com/michael42/stryker-issue-1847
The text was updated successfully, but these errors were encountered: