-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
27 lines (23 loc) · 930 Bytes
/
jest.config.ts
File metadata and controls
27 lines (23 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/** @jest-config-loader esbuild-register */
import nextJest from 'next/jest.js'
import type { Config } from 'jest'
const createJestConfig = nextJest({ dir: './' })
const config: Config = {
coverageProvider: 'v8',
testEnvironment: './tests/PrismaTestEnvironment.ts',
setupFilesAfterEnv: ['./tests/setup.ts', './tests/cleanup.ts'],
collectCoverage: true,
collectCoverageFrom: ['src/**/*.{ts,tsx}'],
coverageReporters: ['text-summary'],
moduleNameMapper: {
// This is needed becaue jest doesn't handle the this code is inside node_modules
'^@/prisma-dobbel-omega/(.*)$': '<rootDir>/node_modules/.prisma-dobbel-omega/$1',
},
}
export default async function jestConfig() {
const base = await createJestConfig(config)()
return {
...base,
transformIgnorePatterns: [], // This needed to transform node_module from es6 syntax, to a syntax jest can handle
}
}