forked from SkalskiP/make-sense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
36 lines (35 loc) · 807 Bytes
/
jest.config.ts
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
import type { Config } from '@jest/types';
// Sync object
const config: Config.InitialOptions = {
rootDir: process.cwd(),
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
transformIgnorePatterns: [],
testEnvironment: 'jsdom',
roots: ["<rootDir>/src"],
setupFilesAfterEnv: ["<rootDir>/src/configureTest.ts"],
transform: {
"^.+(t|j)sx?$": [
"@swc/jest",
{
jsc: {
transform: {
react: {
runtime: 'automatic',
},
},
},
},
],
},
"moduleNameMapper": {
"\\.(css|scss|less)$": "identity-obj-proxy"
},
extensionsToTreatAsEsm: [".ts", ".tsx"],
collectCoverageFrom: [
"**/*.{ts,tsx}",
"!**/node_modules/**",
"!**/dist/**",
"!**/coverage/**",
],
};
export default config;