-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathjest.config.base.js
More file actions
36 lines (35 loc) · 894 Bytes
/
jest.config.base.js
File metadata and controls
36 lines (35 loc) · 894 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
28
29
30
31
32
33
34
35
36
const path = require('node:path')
module.exports = {
roots: ['<rootDir>/src'],
projects: ['<rootDir>'],
preset: 'ts-jest',
moduleFileExtensions: ['js', 'ts'],
transform: {
'^.+\\.(ts|tsx)$': [
'ts-jest',
{
tsconfig: path.join(__dirname, 'tsconfig.jest.json'),
diagnostics: {
ignoreCodes: [
151002, // hybrid module kind (Node16/18/Next)
],
},
},
],
'^.+\\.js$': ['ts-jest', { tsconfig: path.join(__dirname, 'tsconfig.jest.json') }],
},
testMatch: ['**/__tests__/**/*.spec.(ts|js)'],
testEnvironment: 'node',
transformIgnorePatterns: ['node_modules/(?!(p-queue|p-timeout)/)'], // This is not pretty, but required for any esm dependencies
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
coverageDirectory: '<rootDir>/coverage/',
collectCoverage: false,
// verbose: true,
}