FE: Buggy test fix (#33694)

This commit is contained in:
RachelElysia 2025-10-01 10:12:51 -04:00 committed by GitHub
parent 3b812660d2
commit 85032e8aa0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,6 +19,14 @@ const WINDOWS_SCRIPT: IScript = {
updated_at: "2021-01-01",
};
beforeAll(() => {
jest.useFakeTimers();
jest.setSystemTime(new Date("2025-05-02T00:00:00Z")); // "over 4 years ago" after created_at
});
afterAll(() => {
jest.useRealTimers();
});
describe("ScriptListItem", () => {
const onDelete = jest.fn();
const onClickScript = jest.fn();