forked from graphql/graphiql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
33 lines (32 loc) · 984 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
const path = require('path');
const { jsWithTs: tsjPreset } = require('ts-jest/presets');
const { jsWithBabel: jsWithBabelPreset } = require('ts-jest/presets');
module.exports = {
globals: {
'ts-jest': {
tsConfig: './tsconfig.base.json'
}
},
verbose: true,
clearMocks: true,
collectCoverage: true,
setupFiles: [path.join(__dirname, '/resources/enzyme.config.js')],
testMatch: [
'<rootDir>/packages/*/src/**/*-test.{js,ts}',
'<rootDir>/packages/*/src/**/*.spec.{js,ts}',
],
transform: {
'^.+\\.jsx?$': require.resolve('./resources/jestBabelTransform'),
...tsjPreset.transform,
...jsWithBabelPreset.transform
},
testEnvironment: require.resolve('jest-environment-jsdom-global'),
testPathIgnorePatterns: ['node_modules', 'dist', 'codemirror-graphql'],
collectCoverageFrom: [
'**/src/**/*.{js,jsx,ts,tsx}',
'!**/node_modules/**',
'!**/__tests__/**',
'!**/resources/**',
'!**/codemirror-graphql/**',
],
};