-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathjest.config.js
More file actions
54 lines (53 loc) · 1.77 KB
/
Copy pathjest.config.js
File metadata and controls
54 lines (53 loc) · 1.77 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
50
51
52
53
54
// eslint-disable-next-line @typescript-eslint/no-var-requires
const getSrcDirs = require("./config/getSrcDirs");
module.exports = {
preset: "react-native",
testTimeout: 30000, // 30 seconds timeout for all tests
setupFiles: ["./jest.setup.js", "@shopify/react-native-skia/jestSetup.js"],
moduleNameMapper: {
...getSrcDirs(__dirname, "jest"),
"\\.svg$": "<rootDir>/__mocks__/svgMock.tsx",
"^helpers/(.*)$": "<rootDir>/__mocks__/helpers/$1",
"^services/(.*)$": "<rootDir>/__mocks__/services/$1",
},
transformIgnorePatterns: [
`node_modules/(?!(${[
"react-native",
"@react-native",
"@react-navigation",
"@react-native-community",
"react-native-safe-area-context",
"react-native-responsive-screen",
"@shopify/react-native-skia",
"zeego",
"nativewind",
"tailwindcss",
"react-native-css-interop",
"react-native-reanimated",
"@gorhom/bottom-sheet",
"react-native-worklets",
"react-native-qrcode-svg",
"stellar-hd-wallet",
// v16 ships ESM-only deps (@noble/*, smol-toml, uint8array-extras,
// eventsource), some nested under the SDK; transform these so Jest can
// load the SDK's CJS build.
"@stellar/stellar-sdk",
"@noble",
"smol-toml",
"uint8array-extras",
"eventsource",
"react-native-config",
"@react-native-cookies/cookies",
"react-native-view-shot",
"react-native-webview",
"react-native-quick-crypto",
"react-native-nitro-modules",
"react-native-inappbrowser-reborn",
].join("|")})/)`,
],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
coveragePathIgnorePatterns: ["/node_modules/", "/jest"],
transform: {
"^.+\\.(js|jsx|ts|tsx)$": "babel-jest",
},
};