Closed benjamingr closed 2 years ago
Merging #412 (44309b4) into master (1b1ac4a) will decrease coverage by
0.11%
. The diff coverage is87.50%
.
@@ Coverage Diff @@
## master #412 +/- ##
==========================================
- Coverage 94.29% 94.17% -0.12%
==========================================
Files 1 1
Lines 613 618 +5
==========================================
+ Hits 578 582 +4
- Misses 35 36 +1
Flag | Coverage Δ | |
---|---|---|
unit | 94.17% <87.50%> (-0.12%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
src/fake-timers-src.js | 94.17% <87.50%> (-0.12%) |
:arrow_down: |
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 1b1ac4a...44309b4. Read the comment docs.
Let's merge and open another PR to discuss versioning?
I am merging and ignoring the codecov failures due to dropped coverage, but it would be good if that was analyzed somehow so that we understand why. I am guessing the various "if x is present, run this, else that" is only covered if the tests are run in several runtimes (which it is), but are the codecov results just one of these runs or the aggregated result? If the former, then it's hard to do something about it, and if the latter, it is weird that we get a drop.
FWIW for future readers: using fake-timers@9.1.2 (via jest) with nodejs 16.3.0:
jest.useFakeTimers({
now: ...
});
I still have
TypeError: Cannot assign to read only property 'performance' of object '[object global]'
Solution: either upgrade to nodejs 16.5.0+, or use
jest.useFakeTimers({
now: ...
doNotFake: ['performance'],
});
Purpose (TL;DR) - mandatory
Fixes
performance
on Node 16 which has a globalperformance
but not a globalPerformance
cc @fatso83 @SimenB @itayperry