Skip to content

Commit 41fcd0c

Browse files
committed
use timers in tests
1 parent d86d1e5 commit 41fcd0c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

apps/server/src/modules/deletion/controller/api-test/deletion-request-create.api.spec.ts

+8
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ describe(`deletionRequest create (api)`, () => {
8383
};
8484

8585
describe('when create deletionRequest', () => {
86+
beforeAll(() => {
87+
jest.useFakeTimers();
88+
jest.setSystemTime(new Date());
89+
});
90+
91+
afterAll(() => {
92+
jest.useRealTimers();
93+
});
8694
it('should return status 202', async () => {
8795
const { deletionRequestToCreate } = setup();
8896

0 commit comments

Comments
 (0)