Skip to content

Commit

Permalink
fix: test ExportUsersUseCase.spec.ts fails at github actions due to t…
Browse files Browse the repository at this point in the history
…ime mismatch
  • Loading branch information
nshandra committed Dec 17, 2024
1 parent a923088 commit 6f258ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/domain/usecases/__tests__/ExportUsersUseCase.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import {
let userRepositoryMock: UserD2ApiRepository;
let exportUsersUseCase: ExportUsersUseCase;

// NOTE: Needed to avoid the timing mismatch between the usecase execution and expectedFilename generation.
jest.useFakeTimers();
jest.setSystemTime(new Date("2024-01-01T12:00:00Z"));

describe("ExportUsersUseCase", () => {
beforeEach(() => {
userRepositoryMock = mock(UserD2ApiRepository);
Expand Down

0 comments on commit 6f258ea

Please sign in to comment.