Skip to content

Commit 6f15675

Browse files
committed
Merge remote-tracking branch 'base/main'
2 parents b0dfdf8 + 8eea062 commit 6f15675

17 files changed

+10956
-4757
lines changed

jest.config.ts

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import type { Config } from 'jest'
2+
import nextJest from 'next/jest.js'
3+
4+
const createJestConfig = nextJest({
5+
// Provide the path to your Next.js app to load next.config.js and .env files in your test environment
6+
dir: './',
7+
})
8+
9+
// Add any custom config to be passed to Jest
10+
const config: Config = {
11+
coverageProvider: 'v8',
12+
testEnvironment: 'jsdom',
13+
// Add more setup options before each test is run
14+
// setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
15+
}
16+
17+
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
18+
export default createJestConfig(config)

0 commit comments

Comments
 (0)