-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
executable file
·48 lines (45 loc) · 1.54 KB
/
Copy pathjest.config.js
File metadata and controls
executable file
·48 lines (45 loc) · 1.54 KB
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
41
42
43
44
45
46
47
48
module.exports = {
/* ========= */
// ...tsjPreset, /* note:this overwrite transform so dont use it */
preset: 'react-native',
transform: {},
/* note: jest already include rootDir so dont need that (plus it wont work with it because itll be something like rootDir/rootDir...)*/
/* ----------- */
testRegex: '(/src/__tests__/.*)\\.(tsx|ts)$',
/*
test one file:
/.\/src\/__tests__\/App\/myApp\/pages\/EsWebView\/index.tsx/i
or :
npm run test -- src/__tests__/App/myApp/pages/EsWebView/index.tsx
*/
/* ----------- */
// testRegex: '(/src/__tests__/TopBar/index.*)\\.(tsx|ts)$',
'setupFilesAfterEnv': [
'@testing-library/jest-native/extend-expect',
'<rootDir>/config/jestSetup.js',
/* ----------- */
/* ok */
// 'react-app-polyfill/jsdom',
/* ----------- */
],
/* ----------- */
/* new */
clearMocks: true,
// moduleDirectories: ['node_modules', path.join(__dirname, 'src')],
moduleNameMapper: {
/* ------ */
/* mock static files (if u really need them rm these) */
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/assetsTransformer.js',
'\\.(css|less)$': '<rootDir>/assetsTransformer.js'
/* ------ */
// '\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
// '<rootDir>/assetsTransformer.js',
// '\\.(css|less)$': '<rootDir>/assetsTransformer.js',
},
transformIgnorePatterns: [
],
/* ----------- */
// collectCoverageFrom: [
// '{src|projects}/**/{src|lib}/**/*.{ts}',
// ],
}