forked from GMOD/jbrowse-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
37 lines (37 loc) · 1.3 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
// 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',
'^(?!.*\\.(ts|js|tsx|jsx|css|json)$)':
'<rootDir>/config/jest/fileTransform.js',
},
transformIgnorePatterns: [
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$',
'^.+\\.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}',
],
setupFiles: [
'<rootDir>/config/jest/createRange.js',
'<rootDir>/config/jest/fetchMock.js',
'<rootDir>/config/jest/console.js',
'<rootDir>/config/jest/crypto.js',
'jest-localstorage-mock',
],
testURL: 'http://localhost',
testEnvironment: 'jsdom',
}