-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.cjs
73 lines (72 loc) · 1.41 KB
/
jest.config.cjs
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
const esModules = [
'chalk',
'ansi-styles',
'imagemin.*',
'mozjpeg',
'mozjpeg/lib',
'globby',
'array-union',
'slash',
'p-pipe',
'execa',
'strip-final-newline',
'npm-run-path',
'path-key',
'onetime',
'imagemin-mozjpeg/node_modules/mimic-fn',
'mimic-fn',
'human-signals/build/src',
'is-stream',
'is-jpg',
'del',
'is-path-cwd',
'is-path-inside',
'p-map',
'aggregate-error',
'indent-string',
'clean-stack',
'escape-string-regexp',
'remark',
'unified',
'bail',
'is-plain-obj',
'trough',
'vfile',
'unist-util-stringify-position',
'mdast-util-from-markdown',
'mdast-util-to-string',
'micromark/lib',
'micromark-util-.*',
'micromark-factory-.*',
'micromark-util-.*',
'micromark-core-.*',
'mdast-util-to-markdown',
'decode-named-character-reference',
'character-entities',
'zwitch',
'longest-streak',
'unist-util-.*',
'strip-markdown',
].join('|');
module.exports = {
verbose: true,
preset: 'ts-jest',///presets/js-with-ts',
resolver: "ts-jest-resolver",
"transform": {
".ts": "ts-jest",
'.js': ['babel-jest', { configFile: './babel-jest.config.cjs' }],
},
testEnvironment: 'node',
transformIgnorePatterns: [
`node_modules/(?!${esModules})`
],
moduleNameMapper: {
"#(.*)": "<rootDir>/node_modules/$1"
},
globals: {
"ts-jest": {
"useESM": true,
"tsconfig": "<rootDir>/tsconfig.test.json"
}
},
};