-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjest.config.js
More file actions
49 lines (49 loc) · 2.1 KB
/
jest.config.js
File metadata and controls
49 lines (49 loc) · 2.1 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
49
/** @type {import('jest').Config} */
module.exports = {
preset: "jest-expo",
setupFilesAfterEnv: ["./jest.setup.js"],
transformIgnorePatterns: [
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@sentry/react-native|native-base|react-native-svg|react-native-reanimated|react-native-gesture-handler|react-native-screens|react-native-safe-area-context|@shopify/react-native-skia|react-native-aes-gcm-crypto|react-native-fs|@dr.pogodin/react-native-fs|react-native-logs|react-native-worklets|@supersami/rn-foreground-service|@react-native-async-storage/async-storage|@react-native-masked-view/masked-view|@react-native-community/.*|base64-js|zustand|immer|i18next|react-i18next)",
],
moduleNameMapper: {
"\\.svg$": "<rootDir>/__mocks__/svgMock.js",
"\\.bin$": "<rootDir>/__mocks__/binMock.js",
"\\.onnx$": "<rootDir>/__mocks__/binMock.js",
"\\.(txt|wav)$": "<rootDir>/__mocks__/binMock.js",
"^@/(.*)$": "<rootDir>/$1",
},
collectCoverageFrom: [
"app/**/*.{ts,tsx}",
"components/**/*.{ts,tsx}",
"constants/**/*.{ts,tsx}",
"hooks/**/*.{ts,tsx}",
"models/**/*.{ts,tsx}",
"services/**/*.{ts,tsx}",
"stores/**/*.{ts,tsx}",
"theme/**/*.{ts,tsx}",
"utils/**/*.{ts,tsx}",
"!**/*.stories.{ts,tsx}",
"!**/*.test.{ts,tsx}",
"!**/index.{ts,tsx}",
"!**/__mocks__/**",
"!**/node_modules/**",
"!components/ui/icon/flagIcons.ts",
"!components/shared/recording-controls/ThreeWaveLines.tsx",
"!services/background-recording-service/BackgroundRecordingService.ts",
"!services/model-download-service/ModelDownloadService.ts",
"!services/sherpa-transcription-service/SherpaTranscriptionService.ts",
"!stores/model-download-store/modelDownloadStore.ts",
"!models/model-type/ModelType.ts",
"!models/transcription-state/TranscriptionState.ts",
],
coverageThreshold: {
global: {
branches: 90,
functions: 95,
lines: 95,
statements: 95,
},
},
modulePathIgnorePatterns: ["<rootDir>/.yoyo/"],
clearMocks: true,
};