Skip to content

Commit

Permalink
fix(cb2-9747): create mocked date to fix failing unit test (#1469)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonT95 authored Apr 16, 2024
1 parent d9c602a commit 3e639e7
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,16 @@ describe('Vehicle Technical Record Reducer', () => {

});
describe('handleADRExaminerNoteChanges', () => {
it('should', () => {
beforeEach(() => {
const mockedDate = new Date(2024, 5, 20);
jest.useFakeTimers();
jest.setSystemTime(mockedDate);
});

afterEach(() => {
jest.useRealTimers();
});
it('should handle any changes made to the adr examiner notes', () => {
const testNote = {
note: 'testNote',
createdAtDate: new Date().toISOString(),
Expand Down

0 comments on commit 3e639e7

Please sign in to comment.