Here is the code. I'm getting error TypeError: setSystemTime is not available when not using modern timers
when I run the test. I have "@jest/fake-timers": "^27.4.2"
in my package.json since I thought there could be a conflict on the package in some dependencies, but issue remains
beforeAll(() => {
jest.useFakeTimers('modern');
jest.setSystemTime(new Date());
});
afterAll(() => {
jest.useRealTimers();
});
Any idea how to resolve this?