-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
executable file
·53 lines (52 loc) · 1.32 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
require('dotenv').config({ path: '.env.jest' })
// const { pathsToModuleNameMapper } = require('ts-jest/utils')
// const { compilerOptions } = require('./tsconfig')
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html
module.exports = {
// testTimeout: 720000,
testTimeout: 60000,
preset: 'ts-jest',
testEnvironment: 'node',
// testEnvironment: '<rootDir>/tests/jest/mongodb.environment.ts',
globals: {
// 'ts-jest': {
// tsconfig: '<rootDir>/tsconfig.json',
// diagnostics: true
// }
},
roots: [
"tests"
],
moduleFileExtensions: [
'js',
'ts',
'json'
],
moduleNameMapper: {
'^~/(.*)$': '<rootDir>/src/$1',
'^#/(.*)$': '<rootDir>/tests/$1',
},
transform: {
'^.+\\.ts?$': 'ts-jest',
},
testMatch: [
// '**/?(*.)+(spec|test).js?(x)',
'**/?(*.)+(spec|test).ts?(x)',
],
testPathIgnorePatterns: [
"/node_modules/"
],
// coverageDirectory: './coverage',
// collectCoverage: false,
// collectCoverageFrom: [
// '**/src/**/*.ts',
// '!**/*.{test.ts,d.ts,js}',
// ],
globalSetup: '<rootDir>/tests/jest/global-setup.ts',
globalTeardown: '<rootDir>/tests/jest/global-teardown.ts',
// maxConcurrency: 2,
setupFilesAfterEnv: [
'<rootDir>/tests/jest/setup.ts'
],
};