-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
adds ability to pass custom reporter options #9572
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9572 +/- ##
==========================================
+ Coverage 65.04% 65.08% +0.03%
==========================================
Files 286 286
Lines 12140 12143 +3
Branches 3008 3009 +1
==========================================
+ Hits 7897 7903 +6
Misses 3605 3605
+ Partials 638 635 -3
Continue to review full report at Codecov.
|
This is great 👍 Could you add a test? And a changelog entry |
@SimenB I was troubled because I didn't spot any test initially on the Istanbul-reporters loading 🤦♂ . I added a test that covers both use cases (simple loading as well as tuple loading). |
7889e51
to
bf6d69f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if jest should always set projectRoot
to config.rootDir
? Wouldn't that fix #7176?
maxCols: process.stdout.columns || Infinity, | ||
}); | ||
expect(istanbulReports.create).toHaveBeenCalledWith('lcov', { | ||
maxCols: process.stdout.columns || Infinity, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be called with 10
no? I think it makes sense for user options to always override Jest's defaults
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it makes sense for user options to always override Jest's defaults
I wasn't sure what your stance would be about this option, I'll change it
In the case of #7176, |
f6eff21
to
2dc87f2
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks! We could set projectRoot
, but that's separate
Thanks @SimenB ! |
@SimenB how does the release schedule usually look like? We have ugly workarounds in our codebase waiting for this patch, and I’d be happy to prep a release if is can help getting a patch out :) |
Quite slow 🙁 I'll try to get a release out after we've verified fixes for #9457, but it's always slow as I don't have publish access and I need to get somebody at FB to make a release. I recommend using |
Thanks @SimenB ! |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Istanbul-reporters recently changed their coverage reporting behaviour by introducing the
projectRoot
options.This PR attempts to right the wrong and let a jest user configure the
projectRoot
right from the jest config by introducing the configuration through the well known tuple pattern.Fixes #4103