-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathjest.config.js
More file actions
37 lines (37 loc) · 1003 Bytes
/
jest.config.js
File metadata and controls
37 lines (37 loc) · 1003 Bytes
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
module.exports = {
preset: 'react-native',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
modulePathIgnorePatterns: [
'<rootDir>/example/node_modules',
'<rootDir>/lib/',
],
transformIgnorePatterns: [
'node_modules/(?!(' +
'react-native|' +
'@react-native|' +
'@huggingface/transformers|' +
'text-encoding-polyfill' +
')/)',
],
setupFiles: [
'./node_modules/react-native/jest/setup.js',
'./src/__tests__/setup.js',
],
testRegex: '(/__tests__/.*(?<!setup)\\.(test|spec))\\.[jt]sx?$',
testEnvironment: 'node',
transform: {
'^.+\\.(js|jsx|ts|tsx)$': [
'babel-jest',
{ configFile: './babel.config.js' },
],
},
globals: { 'ts-jest': { babelConfig: true, tsconfig: 'tsconfig.json' } },
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov'],
collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!src/**/*.d.ts',
'!src/__tests__/**',
],
};