Skip to content

Commit

Permalink
fixing inconsistent time to live test
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Rogers committed Jun 30, 2023
1 parent 6c0d72f commit e4b3a1d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion shared/src/persistence/dynamo/calculateTimeToLive.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@ import {
formatDateString,
subtractISODates,
} from '../../business/utilities/DateHandler';

import { calculateTimeToLive } from './calculateTimeToLive';

const mockNow = '2022-02-01T05:00:00.000Z';
jest.mock('../../business/utilities/DateHandler', () => {
const originalModule = jest.requireActual(
'../../business/utilities/DateHandler',
);
return {
__esModule: true,
...originalModule,
createISODateString: () => mockNow,
};
});

describe('calculateTimeToLive', () => {
const now = createISODateString();

Expand Down

0 comments on commit e4b3a1d

Please sign in to comment.