Skip to content

Commit

Permalink
テストが通るようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
piny940 committed Jul 29, 2023
1 parent 647d3ff commit b7ec129
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const customJestConfig = {
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/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
Expand Down
2 changes: 2 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// setupJest.js or similar file
require('jest-fetch-mock').enableMocks()

0 comments on commit b7ec129

Please sign in to comment.