-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
29 lines (27 loc) · 889 Bytes
/
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
'use strict';
const { compose, baseConfig } = require('@moxy/jest-config-base');
const withReactNative = require('@moxy/jest-config-react-native');
const { withNTL } = require('@moxy/jest-config-testing-library');
module.exports = compose(
baseConfig('node'),
withReactNative({
transformModules: (patterns) => [...patterns, '@react-navigation/'],
}),
withNTL(),
(config) => ({
...config,
moduleNameMapper: {
...config.moduleNameMapper,
'\\.svg': '<rootDir>/__mocks__/MockSvg.js',
},
coveragePathIgnorePatterns: [
...config.coveragePathIgnorePatterns,
'/test-utils/',
],
setupFilesAfterEnv: [
...config.setupFilesAfterEnv,
'<rootDir>/jest.setup',
require.resolve('react-native-gesture-handler/jestSetup'),
],
}),
);