-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
jest.config.js
34 lines (34 loc) · 993 Bytes
/
jest.config.js
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
28
29
30
31
32
33
34
module.exports = {
transform: {
'^.+\\.ts$': '@swc/jest',
},
testEnvironment: 'node',
testMatch: ['**/src/__tests__/**/*.test.ts'],
collectCoverage: process.env.CI ? true : false,
coverageReporters: ['clover'],
coverageDirectory: 'src/__tests__/coverage',
collectCoverageFrom: ['src/**/*.ts', '!**/__tests__/**/*'],
snapshotSerializers: ['@prisma/sdk/src/utils/jestSnapshotSerializer'],
coveragePathIgnorePatterns: [
'bin.ts',
'setupMysql.ts',
'setupPostgres.ts',
'test-MigrateEngineCommands.ts',
'test-handlePanic.ts',
'test-interactivelyCreateDatabase.ts',
],
// to get rid of "jest-haste-map: Haste module naming collision: package name"
modulePathIgnorePatterns: ['<rootDir>/src/__tests__/fixtures/'],
reporters: [
'default',
[
'jest-junit',
{
addFileAttribute: 'true',
ancestorSeparator: ' › ',
classNameTemplate: '{classname}',
titleTemplate: '{title}',
},
],
],
}