diff --git a/web/src/test/sync/recurrence.test.ts b/web/src/test/sync/recurrence.test.ts index 38a8aa6..c049c5c 100644 --- a/web/src/test/sync/recurrence.test.ts +++ b/web/src/test/sync/recurrence.test.ts @@ -83,8 +83,14 @@ describe('nextOccurrence of the companion against getNextOccurrence of the app, // app keeps the local time and the day of the local month, the companion the // UTC time and the day of the UTC month. describe('in Quebec (America/Toronto), the companion and the app differ', () => { + // Each test sets the zone of Quebec, then the zone of the file comes back: + // the one its first statement set, read here and not written again, so that + // these tests cannot stand in for that statement. + const zone = process.env.TZ; + afterEach(() => { - process.env.TZ = 'UTC'; + if (zone === undefined) delete process.env.TZ; + else process.env.TZ = zone; }); // [due date, recurrence, next occurrence of the companion, of the app]