forked from samadpaydar3/lf-js-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
47 lines (46 loc) · 1.2 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
// Copyright (c) Laserfiche.
// Licensed under the MIT License. See LICENSE in the project root for license information.
export default {
projects: [
{
displayName: 'dom',
preset: 'ts-jest',
moduleDirectories: ['node_modules', '/src'],
moduleFileExtensions: ['ts', 'js'],
reporters: ['default', 'jest-junit'],
transform: {
'^.+\\.ts$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(\\.|/)(spec))\\.ts$',
testEnvironment: 'jsdom',
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json'
},
},
moduleNameMapper: {
"^./(.*).js$": "./$1",
}
},
{
displayName: 'node',
preset: 'ts-jest',
moduleDirectories: ['node_modules', '/src'],
moduleFileExtensions: ['ts', 'js'],
reporters: ['default', 'jest-junit'],
transform: {
'^.+\\.ts$': 'ts-jest',
},
testRegex: '(/__tests__/.*|(\\.|/)(spec))\\.ts$',
testEnvironment: 'node',
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json'
},
},
moduleNameMapper: {
"^./(.*).js$": "./$1",
},
}
]
};