Skip to content

Commit 581e0e4

Browse files
shudingnevilm-lt
authored andcommitted
add moduleNameMapper (vercel#1724)
1 parent 0363a83 commit 581e0e4

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

jest.config.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ module.exports = {
99
'^swr/infinite$': '<rootDir>/infinite/index.ts',
1010
'^swr/immutable$': '<rootDir>/immutable/index.ts'
1111
},
12-
globals: {
13-
'ts-jest': {
14-
tsconfig: 'test/tsconfig.json',
15-
diagnostics: process.env.CI
16-
}
12+
transform: {
13+
'^.+\\.(t|j)sx?$': [
14+
'@swc-node/jest',
15+
{
16+
jsc: {
17+
minify: false
18+
}
19+
}
20+
]
1721
},
1822
coveragePathIgnorePatterns: ['/node_modules/', '/dist/', '/test/'],
1923
coverageProvider: 'v8',

0 commit comments

Comments
 (0)