Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Commit 6d2909d

Browse files
committed
tests: mock date to match snapshot
1 parent 8c5ba99 commit 6d2909d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

apps/client/src/consumers/sbhsApi/__snapshots__/useDtt.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,4 @@ exports[`the schema > parses a day timetable with no periods 1`] = `
189189
},
190190
],
191191
}
192-
`;
192+
`;

apps/client/src/consumers/sbhsApi/useDtt.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { dttSchema } from "./schemas";
2-
import { describe, expect, test } from "vitest";
2+
import { describe, expect, test, vi } from "vitest";
33

44
describe("the schema", () => {
55
test("parses a day timetable with no periods", () => {
@@ -119,6 +119,8 @@ describe("the schema", () => {
119119
shouldDisplayVariations: true,
120120
};
121121

122+
vi.setSystemTime(new Date("2023-09-20T08:00:00.000Z"));
123+
122124
expect(dttSchema.parse(dtt)).toMatchSnapshot();
123125
});
124126
});

0 commit comments

Comments
 (0)