Closed rictic closed 2 years ago
I just ran into this issue as well, so regardless of the solution it would be nice to see this fixed.
The nice part about this solution is that it also catches the case where you call into a library and that library calls process.exit(0)
. That library might even be doing a reasonable thing, but we want the test to fail in that case because not all tests may have completed, let alone completed successfully.
This isn't in tension with a solution that prevents tests from being GC'd
Merging #207 (71476a1) into master (86725b4) will decrease coverage by
0.35%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #207 +/- ##
==========================================
- Coverage 89.48% 89.13% -0.36%
==========================================
Files 4 3 -1
Lines 333 313 -20
==========================================
- Hits 298 279 -19
+ Misses 35 34 -1
Impacted Files | Coverage Δ | |
---|---|---|
src/index.js | 77.06% <100.00%> (+1.81%) |
:arrow_up: |
src/parse.js | ||
src/diff.js | 98.40% <0.00%> (+0.01%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 86725b4...71476a1. Read the comment docs.
Fixes https://github.com/lukeed/uvu/issues/206
Also fixes the case where a test calls process.exit(0) itself, as that's essentially the same thing.