forked from RedHatInsights/insights-runtimes-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
39 lines (38 loc) · 988 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
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/**/*.tsx', '!src/**/stories/*'],
roots: ['<rootDir>/src/'],
moduleNameMapper: {
'\\.(css|scss)$': 'identity-obj-proxy',
},
transformIgnorePatterns,
setupFilesAfterEnv: ['<rootDir>/config/jest.setup.js'],
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',
},
},
},
},
],
},
};