Skip to content

Commit fc781f3

Browse files
committed
edited notes: force tests to run in UTC timezone
1 parent 4bb6f44 commit fc781f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/server/src/routes/api/edited-notes.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ function runTest(dateStrToResolve: string, expectedDate: string) {
2727

2828
describe("edited-notes::resolveDateParams", () => {
2929
beforeEach(() => {
30+
vi.stubEnv('TZ', 'UTC');
3031
vi.useFakeTimers();
3132
vi.setSystemTime(new Date(serverDate));
3233
});
3334

3435
afterEach(() => {
36+
vi.unstubAllEnvs();
3537
// Restore real timers after each test
3638
vi.useRealTimers();
3739
});

0 commit comments

Comments
 (0)