Skip to content

Commit 2182d3c

Browse files
committed
fix tests
1 parent 0ffa96a commit 2182d3c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

frontend/__tests__/test/events/stats.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ describe("stats.ts", () => {
219219
expect(getStartToFirstKeypressMs()).toBe(0);
220220
});
221221

222-
it("throws if no events", () => {
223-
expect(() => getStartToFirstKeypressMs()).toThrow();
222+
it("returns 0 if no events", () => {
223+
expect(getStartToFirstKeypressMs()).toBe(0);
224224
});
225225
});
226226

@@ -254,9 +254,9 @@ describe("stats.ts", () => {
254254
expect(getTestDurationMs()).toBe(3000);
255255
});
256256

257-
it("throws if no end event", () => {
257+
it("returns 0 if no end event", () => {
258258
logTestEvent("timer", 1000, timer("start", 0));
259-
expect(() => getTestDurationMs()).toThrow();
259+
expect(getTestDurationMs()).toBe(0);
260260
});
261261
});
262262

0 commit comments

Comments
 (0)