-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
jest.config.js
34 lines (32 loc) · 1.29 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
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
module.exports = {
preset: 'jest-expo',
verbose: true,
globals: {
'ts-jest': {
tsConfigFile: 'tsconfig.test.json',
},
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
clearMocks: true,
setupFilesAfterEnv: ['<rootDir>/test/setup.ts'],
collectCoverageFrom: ['app/**/*.{js,jsx,ts,tsx}'],
coverageReporters: ['lcov', 'text-summary'],
testPathIgnorePatterns: ['/node_modules/'],
coveragePathIgnorePatterns: ['/node_modules/', '/components/', '/screens/'],
transformIgnorePatterns: [
'node_modules/(?!' +
'(@react-native|react-native)|' +
'expo-*|' +
'@sentry/react-native|' +
'validator|' +
'hast-util-from-selector|hastscript|property-information|hast-util-parse-selector|space-separated-tokens|comma-separated-tokens|zwitch|' +
'@mattermost/calls|@voximplant/react-native-foreground-service|' +
'@rneui/base)',
],
moduleNameMapper: {
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451
uuid: require.resolve('uuid'),
},
};