diff --git a/config/jest/setupTests.ts b/config/jest/setupTests.ts index 738e6bb..1dd6186 100644 --- a/config/jest/setupTests.ts +++ b/config/jest/setupTests.ts @@ -1,2 +1,17 @@ import '@testing-library/jest-dom' import 'regenerator-runtime/runtime' + +// Глобальный мок для GSAP +jest.mock('gsap', () => { + return { + to: jest.fn(), + fromTo: jest.fn(), + killTweensOf: jest.fn(), + context: jest.fn(() => ({ + revert: jest.fn(), + })), + Power2: { + easeOut: 'power2.out', + }, + } +}) diff --git a/tsconfig.json b/tsconfig.json index 92de296..c540bc3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,7 +18,12 @@ "./src/*" ] }, - "strict": true + "strict": true, + "types": [ + "node", + "jest", + "@testing-library/jest-dom" + ] }, "ts-node": { "compilerOptions": {