forked from shufo/blade-formatter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
30 lines (27 loc) · 748 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
import type { Config } from '@jest/types';
const appRoot = require('app-root-path');
const config: Config.InitialOptions = {
globals: {
__basedir: appRoot.toString(),
'ts-jest': {
tsconfig: './tsconfig.json',
},
},
testMatch: ['**/__tests__/**/?(*.)+(spec|test).[jt]s?(x)'],
transform: {
'^.+\\.(js|jsx)$': 'babel-jest',
'^.+\\.(ts|tsx)$': 'ts-jest',
'node_modules/variables/.+\\.(j|t)sx?$': 'ts-jest',
},
transformIgnorePatterns: ['node_modules/(?!variables/.*)'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
testTimeout: 10000,
verbose: true,
cache: false,
testEnvironment: 'node',
setupFiles: ['<rootDir>/jest.setup.ts'],
collectCoverage: true,
};
export default config;