mirror of
https://github.com/zadam/trilium.git
synced 2025-12-07 16:04:23 +01:00
edited notes: force tests to run in UTC timezone
This commit is contained in:
parent
f5ad2ca8ae
commit
9563bdc22b
@ -27,11 +27,13 @@ function runTest(dateStrToResolve: string, expectedDate: string) {
|
|||||||
|
|
||||||
describe("edited-notes::resolveDateParams", () => {
|
describe("edited-notes::resolveDateParams", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
vi.stubEnv('TZ', 'UTC');
|
||||||
vi.useFakeTimers();
|
vi.useFakeTimers();
|
||||||
vi.setSystemTime(new Date(serverDate));
|
vi.setSystemTime(new Date(serverDate));
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
vi.unstubAllEnvs();
|
||||||
// Restore real timers after each test
|
// Restore real timers after each test
|
||||||
vi.useRealTimers();
|
vi.useRealTimers();
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user