mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-05 00:57:59 +01:00
2417f40d37
* Switch jest unit tests to vitest * Cleanup vite config after debugging
9 lines
192 B
TypeScript
9 lines
192 B
TypeScript
export function mockDateNow(initialDateNow: number): void {
|
|
beforeAll(() => {
|
|
vi.useFakeTimers().setSystemTime(initialDateNow);
|
|
});
|
|
|
|
afterAll(() => {
|
|
vi.useRealTimers();
|
|
});
|
|
}
|