forked from thenewboston-blockchain/Account-Manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
32 lines (30 loc) · 1.29 KB
/
jest.config.ts
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
import type {Config} from '@jest/types';
const config: Config.InitialOptions = {
collectCoverageFrom: ['<rootDir>/src/**/*.{js,jsx,ts,tsx}', '!<rootDir>/src/**/*.d.ts'],
globalSetup: './global-setup.js',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'scss'],
moduleNameMapper: {
'@main/(.*)': '<rootDir>/src/main/$1',
'@renderer/(.*)': '<rootDir>/src/renderer/$1',
'@shared/(.*)': '<rootDir>/src/shared/$1',
'^.+.module.(css|sass|scss)$': 'identity-obj-proxy',
},
modulePathIgnorePatterns: ['<rootDir>/src/renderer/store/local/migrationFiles/'],
resetMocks: true,
roots: ['<rootDir>/src'],
setupFiles: ['react-app-polyfill/jsdom'],
testEnvironment: 'jsdom',
testMatch: ['<rootDir>/src/**/*.{spec,test}.{ts,tsx}'],
testRunner: '<rootDir>/node_modules/jest-circus/runner.js',
transform: {
'^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)': '<rootDir>/config/jest/fileTransform.js',
'^.+\\.(js|jsx|mjs|cjs|ts|tsx)$': '<rootDir>/node_modules/babel-jest',
'^.+\\.css$': '<rootDir>/config/jest/cssTransform.js',
},
transformIgnorePatterns: [
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$',
'^.+\\.module\\.(css|sass|scss)$',
],
watchPlugins: ['jest-watch-typeahead/filename', 'jest-watch-typeahead/testname'],
};
export default config;