forked from binary-com/deriv-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
20 lines (20 loc) · 863 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module.exports = {
moduleDirectories: ['node_modules', 'src'],
moduleFileExtensions: ['js', 'ts', 'tsx', 'json', 'node'],
roots: ['src'],
testEnvironment: 'jest-environment-jsdom',
testMatch: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[tj]s?(x)'],
testPathIgnorePatterns: ['\\\\node_modules\\\\'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
'.+\\.(css|styl|less|sass|scss)$': 'jest-css-modules-transform',
'^.+\\.svg$': '<rootDir>/svgTransform.js',
},
collectCoverageFrom: ['./src/**/*.{ts,tsx}', '!**/node_modules/**', '!**/vendor/**'],
moduleNameMapper: {
'^Styles/(.*)$': ['<rootDir>/src/styles/$1'],
'^@assets/(.*)$': '<rootDir>/src/images/$1',
'^@core/(.*)$': '<rootDir>/src/components/core/$1',
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
};