Skip to content

Commit 4259811

Browse files
committed
fix: execution timer tests
1 parent 8c6f362 commit 4259811

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/timer/executionTimer.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ import { ExecutionTimer } from "./executionTimer";
33
describe("ExecutionTimer", () => {
44
let timer: ExecutionTimer;
55

6+
beforeAll(() => {
7+
// redefining readonly property of the performance object
8+
Object.defineProperty(performance, "now", {
9+
value: performance.now,
10+
configurable: true,
11+
writable: true,
12+
});
13+
});
14+
615
beforeEach(() => {
716
timer = new ExecutionTimer();
817
});

0 commit comments

Comments
 (0)