-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
29 lines (29 loc) · 1.1 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
module.exports = {
preset: 'react-native',
transform: {
'^.+\\.[jt]sx?$': 'babel-jest',
},
testEnvironment: 'node',
transformIgnorePatterns: [
'node_modules/(?!(jest-)?@react-native|react-native|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base)',
],
setupFilesAfterEnv: ['@testing-library/jest-native/extend-expect', 'jest-styled-components/native'],
moduleNameMapper: {
'@dev/(.*)': '<rootDir>/src/.dev/$1',
'@atoms/(.*)': '<rootDir>/src/components/atoms/$1',
'@enums/(.*)': '<rootDir>/src/enums/$1',
'@helpers/(.*)': '<rootDir>/src/helpers/$1',
'@molecules/(.*)': '<rootDir>/src/components/molecules/$1',
'@organisms/(.*)': '<rootDir>/src/components/organisms/$1',
'@styles/(.*)': '<rootDir>/src/styles/$1',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
collectCoverage: true,
coverageReporters: ['html'],
reporters: ['default'],
globals: {
'ts-jest': {
tsconfig: 'tsconfig.test.json',
},
},
};