forked from atlassian-labs/react-loosely-lazy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
27 lines (24 loc) · 825 Bytes
/
Copy pathjest.config.js
File metadata and controls
27 lines (24 loc) · 825 Bytes
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
const tsconfig = require('./tsconfig.json');
const { paths } = tsconfig.compilerOptions;
const moduleNameMapper = Object.entries(paths).reduce(
(acc, [key, path]) => ({
...acc,
[`^${key}$`]: `<rootDir>/${path}`,
}),
{}
);
module.exports = {
clearMocks: true,
coverageDirectory: '<rootDir>/coverage',
moduleNameMapper,
resetMocks: true,
setupFilesAfterEnv: ['<rootDir>jest.setup.js'],
// Matches all test.tsx? files under the src directory that are not prefixed with flow, or typescript
testRegex: [
'\\/packages\\/(.+\\/)*(.*(?<!(flow|typescript))\\.)?test\\.tsx?$',
],
testTimeout: 10000,
verbose: true,
// Webpack plugin test generates files which causes an infinite loop in watch mode if not ignored
watchPathIgnorePatterns: ['packages/plugins/webpack/__tests__/app/dist'],
};