-
Notifications
You must be signed in to change notification settings - Fork 63
/
jest.config.js
42 lines (41 loc) · 1.38 KB
/
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
34
35
36
37
38
39
40
41
42
// NOTE: this jest config should be used by projects in packages/*, products/*,
// and plugins/* dirs
module.exports = {
roots: ['.', 'packages/', 'products/', 'plugins/'],
moduleFileExtensions: ['js', 'ts', 'tsx', 'jsx', 'json', 'node'],
transform: {
'^.+\\.(ts|tsx|js|jsx)$': '<rootDir>/config/jest/babelTransform.js',
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
},
transformIgnorePatterns: [
String.raw`[/\\]node_modules[/\\].+\.(js|jsx)$`,
String.raw`^.+\.module\.(css|sass|scss)$`,
],
testMatch: [
'<rootDir>/**/__tests__/**/*.{js,jsx,ts,tsx}',
'<rootDir>/**/*.(spec|test).{js,jsx,ts,tsx}',
],
testPathIgnorePatterns: ['/dist/', '/cypress/', '/demos/'],
collectCoverageFrom: [
'packages/*/src/**/*.{js,jsx,ts,tsx}',
'products/*/src/**/*.{js,jsx,ts,tsx}',
'plugins/*/src/**/*.{js,jsx,ts,tsx}',
// most packages have their src in src/, except for jbrowse-core
'packages/core/**/*.{js,jsx,ts,tsx}',
],
coveragePathIgnorePatterns: [
'!*.d.ts',
'makeWorkerInstance.ts',
'react-colorful.js',
'QuickLRU.js',
],
setupFiles: [
'<rootDir>/config/jest/textEncoder.js',
'<rootDir>/config/jest/fetchMock.js',
'<rootDir>/config/jest/console.js',
'<rootDir>/config/jest/structuredClone.js',
],
testEnvironmentOptions: { url: 'http://localhost' },
testTimeout: 15000,
testEnvironment: 'jsdom',
}