-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
50 lines (49 loc) · 1.09 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
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { pathsToModuleNameMapper } = require('ts-jest');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { compilerOptions } = require('./tsconfig.json');
module.exports = {
roots: [
'<rootDir>'
],
projects: [
'<rootDir>/packages/depub.space/jest.config.json',
'<rootDir>/packages/graphql/jest.config.json'
],
testEnvironment: 'jsdom',
moduleFileExtensions: [
'ts',
'tsx',
'js',
'json'
],
coverageReporters: [
'json',
'lcov',
'text',
'clover'
],
coverageDirectory: 'coverage',
collectCoverageFrom: [
'packages/**/src/**/*.ts',
'!packages/**/src/**/*.interface.ts'
],
testPathIgnorePatterns: [
'<rootDir>/node_modules/'
],
transformIgnorePatterns: [
'<rootDir>/node_modules/'
],
testMatch: [
'**/*.(spec|test).ts?(x)',
'**/*.(spec|test).js?(x)'
],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest'
},
moduleNameMapper: {
...pathsToModuleNameMapper(
compilerOptions.paths /* , { prefix: '<rootDir>/' }, */,
),
},
}