mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-28 05:57:58 +01:00
10 lines
196 B
TypeScript
10 lines
196 B
TypeScript
|
export function mockDateNow(initialDateNow: number): void {
|
||
|
beforeAll(() => {
|
||
|
jest.useFakeTimers().setSystemTime(initialDateNow);
|
||
|
});
|
||
|
|
||
|
afterAll(() => {
|
||
|
jest.useRealTimers();
|
||
|
});
|
||
|
}
|