-
-
Notifications
You must be signed in to change notification settings - Fork 201
/
jest.config.js
32 lines (32 loc) · 1.05 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
const { TextEncoder } = require('util');
module.exports = {
globals: {
TextEncoder: TextEncoder,
},
transform: {
'^.+\\.(js|ts|tsx)$': 'ts-jest',
},
testPathIgnorePatterns: [
'www',
'./src/backend/__tests__/ignore',
'./src/app/__tests__enzyme/ignore',
'./src/backend/__tests__/linkFiber.test.ts',
'./src/app/slices/mainSlice.ts',
],
coveragePathIgnorePatterns: [
'/src/backend/__tests__/ignore/',
'/src/app/__tests__enzyme/ignore',
'./src/backend/__tests__/linkFiber.test.ts',
'./src/app/slices/mainSlice.ts',
],
transformIgnorePatterns: ['/node_modules/(?!d3|d3-array|internmap|delaunator|robust-predicates)'],
testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$',
moduleFileExtensions: ['ts', 'tsx', 'js'],
setupFilesAfterEnv: ['@testing-library/jest-dom'],
testEnvironment: 'jsdom',
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/__mocks__/fileMock.js',
'\\.(scss|sass|css)$': 'identity-obj-proxy',
},
};