-
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
Running Jest with --findRelatedTests #1226
Comments
@nicojs What are your thoughts on this compared to doing code coverage analysis? To use this feature, we'll need to let the testrunner know which file contains a mutant. |
Hmm sounds like a fairly straightforward solution that could speed things up for jest users. We would have to make sure we add integration tests for it. Also: we might need to add it as a confirmation option, as it might result in unexpected behavior, right? This is the documentation for the feature: https://jestjs.io/docs/en/cli#findrelatedtests-spaceseparatedlistofsourcefiles @RobertBroersma thanks for reporting this. Do you want to take a shot at it? |
@nicojs I suppose the option could be added to the config file, perhaps even supporting the I would like to have a crack at it, but I'd need to see if I can get some company time allocated to this, otherwise do it in my spare time. If you could give me some pointers on where to start that would be great! |
PR Opened #1235 |
When running Stryker with Jest, it runs your entire test suite for every mutation. If you have a large test suite this can take quite some time.
Jest has an awesome flag called
--findRelatedTests
, which finds tests related to the file you pass as an arguments. E.g.jest --findRelatedTests index.js
would only run the tests related toindex.js
. (Often used with lint-staged.If it would be possible to pass the current mutation to the Test Runner, this would save a ton of time!
The text was updated successfully, but these errors were encountered: