-
Notifications
You must be signed in to change notification settings - Fork 9
/
jest.config.js
40 lines (40 loc) · 1.04 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
module.exports = {
preset: 'ts-jest',
transform: {
'^.+\\.(ts|tsx)$': [
'@swc/jest',
{
sourceMaps: true,
jsc: {
transform: {
react: {
runtime: 'automatic',
},
},
},
},
],
},
testEnvironment: 'jsdom',
testEnvironmentOptions: {
url: 'http://localhost',
},
testPathIgnorePatterns: ['./.docz/', './node_modules/'],
snapshotSerializers: ['@emotion/jest/serializer'],
modulePaths: ['<rootDir>/src/'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
moduleDirectories: ['node_modules', 'src'],
setupFilesAfterEnv: ['<rootDir>/.jest/setup.ts'],
coverageDirectory: 'reports/jest',
coverageReporters: ['cobertura', 'text-summary', 'html'],
collectCoverageFrom: [
'src/@(components|utils|styles)/**/*.{js,ts,tsx}',
'!src/@(components|utils|styles)/**/index.{js,ts,tsx}',
'!src/utils/test-utils.tsx',
'!src/@(types)/*.ts',
'!src/@(docs)/*.mdx',
'!**/*.d.ts',
'!.jest/**',
'!**/node_modules/**',
],
};