forked from trezor/trezor-suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.base.js
40 lines (35 loc) · 1.1 KB
/
jest.config.base.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
const babelConfig = {
presets: [
['@babel/preset-env', { targets: { node: 'current' }, modules: 'commonjs' }],
'@babel/preset-typescript',
[
'@babel/preset-react',
{
runtime: 'automatic',
},
],
],
};
module.exports = {
rootDir: process.cwd(),
// An array of file extensions your modules use
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
// The glob patterns Jest uses to detect test files
testMatch: ['**/?(*.)+(spec|test).[tj]s?(x)'],
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
testPathIgnorePatterns: [
'/node_modules/',
'/libDev/',
'/lib/',
'/dist/',
'/build/',
'/build-electron/',
'/coverage/',
'/public/',
],
transform: {
'\\.(js|jsx|ts|tsx)$': ['babel-jest', babelConfig],
},
// An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode
watchPathIgnorePatterns: ['libDev', 'lib'],
};