Closed zbyte64 closed 10 months ago
Patch coverage: 50.00%
and no project coverage change.
Comparison is base (
b568150
) 96.47% compared to head (4982ed0
) 96.47%.:exclamation: Current head 4982ed0 differs from pull request most recent head 0fdc0ad. Consider uploading reports for the commit 0fdc0ad to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Purpose
Fix issue #420 by favoring the constructor of the performance instance over the Performance class
Background
jsdom also patches the
Performance
class and doesn't implement all of the methods.I could not use the workaround mentioned: https://github.com/sinonjs/fake-timers/issues/394#issuecomment-1021665619 because I'm using vitest with jsdom as the environment.
Solution
This simply favors the prototype of the performance instance, since that seems to be untouched by jsdom.