-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathjest.config.js
42 lines (41 loc) · 973 Bytes
/
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
const path = require('path');
module.exports = {
displayName: 'react',
testEnvironment: 'jsdom',
clearMocks: true,
resetMocks: true,
rootDir: path.resolve(__dirname),
moduleNameMapper: {
'^@oakjs/core$': path.resolve('./packages/core/lib'),
'^@oakjs/core(.+)$': path.resolve('./packages/core/lib$1'),
'^@tests-utils$': path.resolve(__dirname, 'tests/utils.js'),
},
coveragePathIgnorePatterns: [
'node_modules',
'dist',
'tests/',
'^.+\\.styl$',
],
transform: {
'^.+\\.(t|j)sx?$': [
'@swc/jest',
{
jsc: {
transform: {
react: {
runtime: 'automatic',
},
},
},
},
],
'^.+\\.styl$': 'jest-css-modules-transform',
},
transformIgnorePatterns: [
'/node_modules/(?!(uuid))',
],
setupFilesAfterEnv: [
path.resolve('./.ci/config/env.js'),
],
snapshotResolver: path.resolve('.ci/config/snapshot-resolver.js'),
};