-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.ts
29 lines (22 loc) · 1.07 KB
/
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
import type { JestConfigWithTsJest } from 'ts-jest'
const config: JestConfigWithTsJest = {
// Indicates whether each individual test should be reported during the run
verbose: true,
// The test environment that will be used for testing
testEnvironment: 'jsdom',
// A map from regular expressions to paths to transformers
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: { allowJs: true } }]
},
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
transformIgnorePatterns: ['<rootDir>/node_modules/(?!(wagmi|@wagmi)/)'],
// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
moduleNameMapper: {
'^@/(.*)\\.js$': '<rootDir>/src/$1',
'^@test/(.*)\\.js$': '<rootDir>/test/$1',
'^(\\.{1,2}/.*)\\.js$': '$1'
},
// A list of paths to modules that run some code to configure or set up the testing framework before each test
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts']
}
export default config