From 246371c43141eb736af9916688bebe098ea39e1e Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Sun, 23 Nov 2025 14:15:45 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BD=D0=B0=D1=8F=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8?= =?UTF-8?q?=D1=8F=20setupTests=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/jest/setupTests.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 config/jest/setupTests.ts diff --git a/config/jest/setupTests.ts b/config/jest/setupTests.ts new file mode 100644 index 0000000..b5c24bc --- /dev/null +++ b/config/jest/setupTests.ts @@ -0,0 +1,24 @@ +import '@testing-library/jest-dom' +import 'regenerator-runtime/runtime' + +// Глобальный мок для GSAP +jest.mock('gsap', () => { + const gsapMock = { + to: jest.fn(), + fromTo: jest.fn(), + killTweensOf: jest.fn(), + context: jest.fn(() => ({ + revert: jest.fn(), + })), + Power2: { + easeOut: 'power2.out', + }, + } + + return { + __esModule: true, + default: gsapMock, // Для default import + gsap: gsapMock, // Для named import + Power2: gsapMock.Power2, // Экспортируем Power2 отдельно + } +})