Skip to content

Commit

Permalink
use timers in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sszafGCA committed Nov 24, 2023
1 parent d86d1e5 commit 41fcd0c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ describe(`deletionRequest create (api)`, () => {
};

describe('when create deletionRequest', () => {
beforeAll(() => {
jest.useFakeTimers();
jest.setSystemTime(new Date());
});

afterAll(() => {
jest.useRealTimers();
});
it('should return status 202', async () => {
const { deletionRequestToCreate } = setup();

Expand Down

0 comments on commit 41fcd0c

Please sign in to comment.