From b7ec12962a58b7a22ce656a6f13d73156691d317 Mon Sep 17 00:00:00 2001 From: piny940 Date: Sat, 29 Jul 2023 13:00:13 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=86=E3=82=B9=E3=83=88=E3=81=8C=E9=80=9A?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jest.config.js | 2 ++ jest.setup.js | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 jest.setup.js diff --git a/jest.config.js b/jest.config.js index bddc9db4..293eb10c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -16,6 +16,8 @@ const customJestConfig = { moduleNameMapper: { '^@/(.*)$': '/src/$1', // 追加 }, + automock: false, + setupFiles: ['./jest.setup.js'], } // createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async diff --git a/jest.setup.js b/jest.setup.js new file mode 100644 index 00000000..60e7fc29 --- /dev/null +++ b/jest.setup.js @@ -0,0 +1,2 @@ +// setupJest.js or similar file +require('jest-fetch-mock').enableMocks()