Skip to content

Commit

Permalink
Force a consistent non-UTC timezone for tests, so we can validate out…
Browse files Browse the repository at this point in the history
…puts
  • Loading branch information
dannon committed Dec 9, 2024
1 parent 82ef3d2 commit 708dcd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/utils/dates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ describe("dates.ts", () => {
expect(formatted).toBe("Sunday Oct 1st 8:00:00 2023 GMT-4");
});
});
});
});
3 changes: 3 additions & 0 deletions client/tests/jest/jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");

0 comments on commit 708dcd6

Please sign in to comment.