diff --git a/client/src/utils/dates.test.ts b/client/src/utils/dates.test.ts index be2ee28c06eb..02583c03258e 100644 --- a/client/src/utils/dates.test.ts +++ b/client/src/utils/dates.test.ts @@ -38,4 +38,4 @@ describe("dates.ts", () => { expect(formatted).toBe("Sunday Oct 1st 8:00:00 2023 GMT-4"); }); }); -}); \ No newline at end of file +}); diff --git a/client/tests/jest/jest.setup.js b/client/tests/jest/jest.setup.js index 505e186fd517..430ed695106b 100644 --- a/client/tests/jest/jest.setup.js +++ b/client/tests/jest/jest.setup.js @@ -12,6 +12,9 @@ Vue.config.devtools = false; and this makes the tag tests work correctly */ global.setImmediate = global.setTimeout; +// Consistent timezone for tests so we can compare dates +process.env.TZ = "America/New_York"; + // Always mock the following imports jest.mock("@/composables/hashedUserId"); jest.mock("@/composables/userLocalStorage");