-
Notifications
You must be signed in to change notification settings - Fork 74
/
jest.config.js
45 lines (45 loc) · 1.17 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
export default {
verbose: false,
testEnvironment: 'node',
rootDir: '.',
roots: [
'<rootDir>/spec/',
],
cacheDirectory: '.jest-cache',
extensionsToTreatAsEsm: ['.ts'],
moduleFileExtensions: ['js', 'mjs', 'ts'],
coverageProvider: 'v8',
coverageReporters: ['lcov', 'json', ['text', { skipFull: true }]],
coveragePathIgnorePatterns: [
'spec\\/.*\\.(ts|js)$',
'/node_modules/',
],
moduleNameMapper: {
'^ix$': '<rootDir>/src/node',
'^ix(.*)': '<rootDir>/src$1',
'^(\\.{1,2}/.*)\\.js$': '$1',
},
testRegex: '(.*(-|\\.)spec)\\.(ts|js)$',
transform: {
'^.+\\.js$': [
'ts-jest',
{
diagnostics: false,
tsconfig: 'spec/tsconfig.json',
useESM: true,
},
],
'^.+\\.ts$': [
'ts-jest',
{
diagnostics: false,
tsconfig: 'spec/tsconfig.json',
useESM: true,
},
],
},
transformIgnorePatterns: [
'/targets/(es5|es2015|esnext|ix)/',
'/node_modules/(?!@openpgp/web-stream-tools)/',
],
};