From a5e5425c33a680f9286bede2b16271886d0466a3 Mon Sep 17 00:00:00 2001 From: denshooter Date: Wed, 15 Oct 2025 16:10:21 +0200 Subject: [PATCH] Fix ESLint error in jest.setup.ts - Change @ts-ignore to @ts-expect-error as required by ESLint - Simplify React.act mock to avoid TypeScript complexity - Ensures linting passes in pre-push checks --- jest.setup.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/jest.setup.ts b/jest.setup.ts index 4b4efde..c79122b 100644 --- a/jest.setup.ts +++ b/jest.setup.ts @@ -9,12 +9,10 @@ if (process.env.NODE_ENV === 'production') { // Override React.act for production builds const originalAct = React.act; if (!originalAct) { - React.act = (callback: () => void | Promise) => { - const result = callback(); - if (result instanceof Promise) { - return result; - } - } as typeof React.act; + // @ts-expect-error - Mock for production builds + React.act = (callback: () => void) => { + callback(); + }; } // Also mock the act function from react-dom/test-utils