-
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
Multiple config workarounds needed for dry run to work for React [Stryker 4.0.0-beta] #2403
Comments
Thanks again for the help! I think the problems is mostly with the
(btw, great you found those!) Ideally we don't want these settings here. However, they are needed for scenario's where you use typescript as a compiler. Typescript compilation normally fails (by design) because mutation switching introduces a lot of type errors (by design). To counteract this, we add the sandbox: {
fileHeaders: {
"**/*+(.js|.ts|.cjs|.mjs)?(x)": "/* eslint-disable */\n// @ts-nocheck\n"
}
} The If someone can think of a better way to deal with compile errors, please let me know! |
updated: I tried disabling my workaround options one-by-one. All are needed, including both sandbox options. Possible exception is I suspect that the I tried sandbox config, does not look right sandbox: {
fileHeaders: {
'**/!(.jest)+(.js|.ts|.cjs|.mjs)?(x),!**/__test__/**':
'/* eslint-disable */\n// @ts-nocheck\n',
},
stripComments: '**/!(.jest)+(.js|.ts|.cjs|.mjs)?(x),!**/__test__/**',
}, P.S. I did try using my local build of hacks to skip sources in
|
I'll remove the milestone from this issue. I think we're pretty happy with the current status of mutation switching. We've removed the strange If you agree @brodybits than we can also close this issue. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
updated:
Question
As I said in #1514, I needed some config workarounds for the dry run to work with https://github.com/facebook/react:
buildCommand
settingsymlinkNodeModules
setting (recommended)sandbox
optionsI got the dry run working on 4.0.0-beta.3 with the following config (with a bit trial-and-error):
I don't know if any of the config items may be redundant.This is not a blocker but seems to be a bit counterintuitive.
Stryker environment
Test runner is command.
As a side point, I suspect it should be possible to get the Jest runner working with React with the right kind of utility script rework.
Additional context
I am generally testing with
stryker.conf.js
which seems to be a bit more flexible than working with JSON.I did have to comment a shebang out of
scripts/jest/jest.js
in React to get past issue #2398.I think this is less important than other issues #2400, #2399, #2398.
The text was updated successfully, but these errors were encountered: