edited notes: force tests to run in UTC timezone

This commit is contained in:
contributor 2025-11-11 20:00:47 +02:00
parent f5ad2ca8ae
commit 9563bdc22b

View File

@ -27,11 +27,13 @@ function runTest(dateStrToResolve: string, expectedDate: string) {
describe("edited-notes::resolveDateParams", () => {
beforeEach(() => {
vi.stubEnv('TZ', 'UTC');
vi.useFakeTimers();
vi.setSystemTime(new Date(serverDate));
});
afterEach(() => {
vi.unstubAllEnvs();
// Restore real timers after each test
vi.useRealTimers();
});