forked from webpack/webpack-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
21 lines (19 loc) · 919 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
const { cli } = require('webpack');
// Ignore core-flags test for webpack@4
const ignorePattern = typeof cli !== 'undefined' ? ['<rootDir>/node_modules/'] : ['<rootDir>/node_modules/', '<rootDir>/test/core-flags'];
module.exports = {
testPathIgnorePatterns: ignorePattern,
testEnvironment: 'node',
collectCoverage: true,
coverageReporters: ['none'],
transform: {
'^.+\\.(ts)?$': 'ts-jest',
},
testRegex: ['/__tests__/.*\\.(test.js|test.ts)$', '/test/.*\\.(test.js|test.ts)$'],
moduleFileExtensions: ['ts', 'js', 'json'],
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
setupFilesAfterEnv: ['<rootDir>/setupTest.js'],
globalTeardown: '<rootDir>/scripts/cleanupTest.js',
globalSetup: '<rootDir>/scripts/globalSetup.js',
modulePathIgnorePatterns: ['<rootDir>/test/loader/test-loader', '<rootDir>/test/plugin/test-plugin'],
};