-
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
mocha-runner: Add support for test's fileName #3504
mocha-runner: Add support for test's fileName #3504
Conversation
Mocha support filenames, see: mochajs/mocha@3dd1cdb
Hi @IvanGoncharov 🙋♂️ This is actually pretty awesome! I didn't even know this feature was added, it seems to be missing from the changelog Adding this I'll try to find some time to test this out and see how it works without sourcemap. If it can already deliver some value I'll merge this and work on sourcemaps in another branch. EDIT: Even more important is the location within the file. That is still missing. See mochajs/mocha#4572 |
Interesting! This is what Stryker makes of it: As you can see it kind of works. For Stryker it shows the I personally think this is already adding value. What do you think @IvanGoncharov? (report here: mutation.zip) |
@nicojs yes, it adds value for me. Actually, I want to share context on what I'm currently doing and maybe you can suggest some additional tips. I recently adopted stryker on https://github.com/graphql/graphql-js and we got 90% mutant coverage 🎉 We have
I'm betting on the fact that most of the mutants will be killed by It looks like MutantPlanner has all the necessary info.
Currently, my biggest problem is that Not sure, if those experiments will work or how useful for other projects they will end up. |
Yeah, test sorting would be a nice performance boost for some projects. It would need an implementation specific to each test runner, bringing a big maintenance overhead. And most test runners don't support a custom order (I think jasmine and jest are the only ones). |
I'll try to get this PR merged today. For the sorting of tests, feel free to open a separate issue. We could implement it for test runners that support it. For jest, we could create a custom sequencer |
Example of the clear-text reporter output:
|
Mocha support filenames, see: mochajs/mocha@3dd1cdb
I plan to use it as my plugin.
I tried to write tests based on jest-runner tests from #2808 but I'm lost in the test code.
I'm interested in getting this PR merged so would be grateful if someone adopts this PR and write missing tests.