-
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
Feature request - Add coverage analysis for Jest #965
Comments
@Tobino thanks for creating this issue. We've chatted about this on Gitter, I'll include the explanation I gave there here as a reference for anyone interested. You've shown interest to help us crack this nut. Thanks a lot in advance! I've created a branch ("965-jest-coverage-analysis") and added one integration test ( This is the problem we're currently facing. This should be a good starting place to help you on you're journey. Happy hunting! My remark from Gitter (as a reference):
|
Hello, It seems that Jest deep clone coverage on each testSuite, and push this result on coverage field. I guess coverage is the result of each worker from Jest, and I don't know if Stryker is able to use this format directly or a merge of coverage with PR: #1003 |
Thanks for your update, I will take a look next week. Just to be clear, is Jest itself also instrumenting the code? |
I think Jest use istanbulJs to instrument the code, but I am not sure if it's the right answer. |
Yeah, that isn't what we want. We now use istanbul to instrument the code our selves before the initial test run (based on the We're actually looking for a way to mark a global variable as "don't touch this one" in jest. Do you know if that's possible? I have looked at this problem before, but usually was looking on the global scope. I haven't thought to look at |
I think |
I believe this is implemented with this PR: #1235 I'm closing this issue for now. If the problem is still there, let us know! |
@simondel I don't think that this PR is related to the issue. For example, I have a lot of tests for my Vue component. And even with |
I agree with @Djaler , this issue is related for Coverage analysis for Jest, this PR is for fixing JestTestRunner. I believe this should be reopened, or if we're wrong the Readme at least should be updated here. |
Summary
Is it possible to add coverage analysis, to provide a better experience on mutation testing with jest ?
For now,
stryker-jest-runner
create mutants on every single part of code, even if statement or branch are not reach.I would like to add my contribution to stryker, to help bigger application to use stryker, without to add mutation on unreachable statement during initial test run.
Stryker config
Stryker environment
Your Environment
The text was updated successfully, but these errors were encountered: