forked from Atyantik/pawjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
41 lines (39 loc) · 960 Bytes
/
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
41
const babelJest = require('babel-jest');
const babelServerRule = require('./src/webpack/inc/babel-server-rule')({
cacheDirectory: false,
noChunk: true,
}).use.options;
const customJest = babelJest.createTransformer({
presets: babelServerRule.presets,
plugins: babelServerRule.plugins,
});
customJest.includes = query => query === 'babel-jest';
module.exports = {
name: 'pawjs',
verbose: true,
testEnvironment: 'node',
coverageDirectory: './coverage',
collectCoverage: true,
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!**/node_modules/**',
'!**/dist/**',
],
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(ts|tsx|js|jsx|mjs)?$',
testPathIgnorePatterns: [
'/node_modules/',
'/__test_utils/',
'__tests__/.*/fixtures/',
],
moduleFileExtensions: [
'ts',
'tsx',
'js',
'jsx',
'json',
'node',
],
transform: {
'^.+\\.(j|t)sx?$': '<rootDir>/jest-transformer.js',
},
};