-
Notifications
You must be signed in to change notification settings - Fork 8
/
jest.config.js
40 lines (37 loc) · 1.51 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
38
39
40
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig.json');
module.exports = {
collectCoverageFrom: [
'<rootDir>/cardstack/src/*/**/*.js',
'<rootDir>/cardstack/src/*/**/*.ts',
'<rootDir>/cardstack/src/*/**/*.tsx',
'!<rootDir>/cardstack/src/*/**/*.story.tsx',
'!<rootDir>/cardstack/src/theme/*',
'!<rootDir>/cardstack/src/types/*',
// ran into a weeeeird issue testing this so ignoring for now, will try to fix later
'!<rootDir>/cardstack/src/components/Icon/Icon.tsx',
'!<rootDir>/cardstack/src/components/Input/Input.tsx',
'!<rootDir>/cardstack/src/components/Icon/custom-icons/*',
],
preset: 'jest-expo',
coverageDirectory: '.coverage',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
setupFilesAfterEnv: [
'<rootDir>/cardstack/src/test-utils/jest-setup.js',
'./node_modules/react-native-gesture-handler/jestSetup.js',
],
testMatch: [
'<rootDir>/cardstack/**/*.test.ts',
'<rootDir>/cardstack/**/*.test.js',
'<rootDir>/cardstack/**/*.test.jsx',
'<rootDir>/cardstack/**/*.test.tsx',
],
transformIgnorePatterns: [
'node_modules/(?!((jest-)?react-native|@sentry|@cardstack|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)',
],
moduleNameMapper: {
...pathsToModuleNameMapper(compilerOptions.paths, {
prefix: '<rootDir>/',
}),
},
};