forked from artsy/eigen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
27 lines (26 loc) · 946 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
const moduleNameMap = require("./alias").jestModuleNameMap
module.exports = {
preset: "react-native",
moduleFileExtensions: ["ts", "tsx", "js"],
rootDir: "./",
moduleNameMapper: moduleNameMap,
testMatch: ["<rootDir>/**/*.tests.(ts|tsx|js)"],
testEnvironment: "jsdom",
testURL: "http://localhost/",
setupFilesAfterEnv: [
"jest-extended",
"@testing-library/jest-native/extend-expect",
"./src/setupJest.ts",
],
cacheDirectory: ".jest/cache",
transform: {
"^[./a-zA-Z0-9$_-]+\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$":
"<rootDir>/node_modules/react-native/jest/assetFileTransformer.js",
".*(ts|tsx|js|jsx)$": "babel-jest",
"\\.graphql$": "jest-raw-loader",
},
transformIgnorePatterns: [
"node_modules/(?!(react-native(-.*)?/(@react-native-community/.*))?|react-navigation|@react-navigation/.*)",
],
watchPlugins: ["jest-watch-typeahead/filename", "jest-watch-typeahead/testname"],
}