-
-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathjest.config.js
More file actions
executable file
·43 lines (42 loc) · 1.05 KB
/
jest.config.js
File metadata and controls
executable file
·43 lines (42 loc) · 1.05 KB
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
42
43
const esm = [
'd3-*',
'earcut',
'potpack',
'@mapbox',
'roughjs',
'@chenglou/pretext',
]
.map((d) => `_${d}|${d}`)
.join('|');
module.exports = {
testTimeout: 100000,
setupFiles: ['<rootDir>/__tests__/jest-pretext-canvas.js'],
testMatch: [
'<rootDir>/__tests__/**/*/*.spec.+(ts|tsx|js)',
'!**/e2e/*.spec.+(ts|tsx|js)',
'!**/ui/*.spec.+(ts|tsx|js)',
'!**/ecs/*.spec.+(ts|tsx|js)',
// '**/ssr/selector.spec.+(ts|tsx|js)',
],
preset: 'ts-jest',
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
modulePathIgnorePatterns: ['dist'],
collectCoverageFrom: ['packages/core/src/**/*.ts'],
transform: {
'^.+\\.[tj]s$': [
'ts-jest',
{
isolatedModules: true,
tsconfig: {
allowJs: true,
target: 'esnext',
esModuleInterop: true,
},
},
],
},
// pnpm nests deps at .pnpm/<name>@<ver>/node_modules/<name>/ — whitelist must include that prefix
transformIgnorePatterns: [
`<rootDir>/node_modules/(?!(?:\\.pnpm/[^/]+/node_modules/)?(${esm}))`,
],
};