-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjest.config.js
More file actions
58 lines (58 loc) · 1.37 KB
/
Copy pathjest.config.js
File metadata and controls
58 lines (58 loc) · 1.37 KB
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
/** @type {import('jest').Config} */
module.exports = {
projects: [
{
displayName: 'legacy-decorators',
preset: 'ts-jest',
testEnvironment: 'node',
clearMocks: true,
testMatch: ['**/*.test.ts?(x)'],
testPathIgnorePatterns: [
'/node_modules/',
'/dist/',
'standardDecorators.test.ts',
],
},
{
displayName: 'swc-legacy-decorators',
testEnvironment: 'node',
clearMocks: true,
testMatch: ['**/*.test.ts?(x)'],
testPathIgnorePatterns: [
'/node_modules/',
'/dist/',
'standardDecorators.test.ts',
],
transform: {
'^.+\\.tsx?$': [
'@swc/jest',
{
jsc: {
parser: { syntax: 'typescript', decorators: true },
transform: { legacyDecorator: true, decoratorMetadata: true },
target: 'es2020',
},
},
],
},
},
{
displayName: 'standard-decorators',
testEnvironment: 'node',
clearMocks: true,
testMatch: ['**/standardDecorators.test.ts'],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
tsconfig: {
experimentalDecorators: false,
emitDecoratorMetadata: false,
target: 'ES2022',
},
},
],
},
},
],
}