-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
feat: add temporary istambul report file #70
base: master
Are you sure you want to change the base?
feat: add temporary istambul report file #70
Conversation
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
=========================================
+ Coverage 97.7% 97.9% +0.19%
=========================================
Files 2 2
Lines 131 143 +12
=========================================
+ Hits 128 140 +12
Misses 3 3
Continue to review full report at Codecov.
|
47ceb1b
to
20e1e4a
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.
So sorry about the late reply on this, I completely missed your PR 😞
This is looking good, thank you! I just had a couple of small comments around some issues I spotted.
const tempFolder = coverageConfig.tempDirectory; | ||
|
||
if (fs.existsSync(tempFolder) === true) { | ||
fs.removeSync(tempFolder); |
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.
Doing this will wipe the temp directory on every run, so from what I can tell only one coverage file will ever be written there and when you run nyc merge .nyc_output coverage.json
it won't include output files from all runs.
I guess we also want an option to control whether to delete the temp directory, so you could set it to delete it only on the first repo that runs and then subsequent repos in your mono repo wouldn't delete it. This is kind of how the nyc example works, where cover:integration
uses --no-clean
to not wipe the output directory before running.
WDYT?
JSON.stringify(temporaryFileDateResult) | ||
); | ||
} else { | ||
log.warn('No coverage data found'); |
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 will always log when you're not using the tempDirectory
option. Can you also make it debug
level as well?
I add the ability to generate a temporary coverage report file like nyc did it.
On this way we are able to merge multiple test coverage reports into a single report file.
For example, if you use a monorepository with multiple project and each of these projects should generate his own once but these report should be summed up in one report.