-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
30 lines (27 loc) · 897 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
30
/**
* @Author: Rostislav Simonik <rostislav.simonik@technologystudio.sk>
* @Date: 2021-05-15T12:05:47+02:00
* @Copyright: Technology Studio
**/
const { pathsToModuleNameMapper } = require('ts-jest')
const { compilerOptions } = require('./tsconfig.json');
const { defaults } = require('jest-config');
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'react-native',
testMatch: [
'<rootDir>/__tests__/Tests/**/?(*.)(spec|test).ts',
'<rootDir>/src/components/**/__tests__/?(*.)(spec|test).(ts|tsx)'
],
testPathIgnorePatterns: [
'/node_modules/'
],
setupFiles: [
'<rootDir>/__tests__/Setup.ts',
],
moduleFileExtensions: [
...defaults.moduleFileExtensions,
],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths , { prefix: '<rootDir>/' } ),
}