-
Notifications
You must be signed in to change notification settings - Fork 39
/
jest.config.js
42 lines (40 loc) · 1.06 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
const transformIgnorePatterns = ['node_modules/(?!(uuid)/)'];
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'jsdom',
coverageDirectory: './coverage/',
collectCoverage: true,
collectCoverageFrom: ['src/**/*.js', '!src/**/stories/*'],
roots: ['<rootDir>/src/'],
moduleNameMapper: {
'\\.(css|scss)$': 'identity-obj-proxy',
},
testMatch: ['**/?(*.)+(test).ts?(x)', '**/?(*.)+(test).js?(x)'],
setupFilesAfterEnv: ['<rootDir>/config/setupTests.js'],
transformIgnorePatterns,
// modulePathIgnorePatterns: ['__mocks__'],
transform: {
'^.+\\.(ts|js)x?$': [
'@swc/jest',
{
$schema: 'http://json.schemastore.org/swcrc',
jsc: {
experimental: {
plugins: [['jest_workaround', {}]],
},
parser: {
jsx: true,
syntax: 'typescript',
tsx: true,
},
transform: {
react: {
runtime: 'automatic',
},
},
},
},
],
},
};