-
Notifications
You must be signed in to change notification settings - Fork 3
/
jest.config.js
22 lines (20 loc) · 890 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
// Copied from https://github.com/jaredpalmer/tsdx/blob/master/src/createJestConfig.ts
// Edited testPathIgnorePatterns to add the generated folder.
const generatedFolder = '<rootDir>/test/generated/';
module.exports = {
transform: {
'.(ts|tsx)$': require.resolve('ts-jest/dist'),
'.(js|jsx)$': require.resolve('babel-jest'), // jest's default
},
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
testPathIgnorePatterns: ['/node_modules/', generatedFolder],
watchPathIgnorePatterns: [generatedFolder],
collectCoverageFrom: ['src/**/*.{ts,tsx,js,jsx}'],
testMatch: ['<rootDir>/**/*.(spec|test).{ts,tsx,js,jsx}'],
testURL: 'http://localhost',
watchPlugins: [
require.resolve('jest-watch-typeahead/filename'),
require.resolve('jest-watch-typeahead/testname'),
],
};