-
Notifications
You must be signed in to change notification settings - Fork 242
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
Exclude code with regex #2966
Comments
The solution that I want to add is allowing for |
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. |
Ignore-plugins are released in StrykerJS 7.3 🎉 . Ignoring something like https://twitter.com/stryker_mutator/status/1713557660832792870 https://stryker-mutator.io/docs/stryker-js/disable-mutants/#using-an-ignore-plugin |
Is your feature request related to a problem? Please describe.
My project uses material-ui's style engine, so the CSS is included in the JS files. Stryker mutates the CSS, but this doesn't affect the functionality of the unit tests at all, so it is not useful. I have a similar issue with the
prop-types
library which does runtime type checking. Mutating this section also doesn't do anything, so I would like to exclude it.Describe the solution you'd like
I would like to be able to exclude some of the code in a file from mutation specified via RegEx, for example:
Exclude the "makeStyles" CSS engine section of my code which looks like this:
with this expression:
/.*makeStyles\(\((.|\n)*\}\)\).*/
Describe alternatives you've considered
I have considered using the mutation range config to specify what lines to mutate, but this would be tedious to do for my entire project, and my team would have to remember to update the lines any time the code is changed.
The text was updated successfully, but these errors were encountered: