-
Notifications
You must be signed in to change notification settings - Fork 35
/
jest.config.js
22 lines (20 loc) · 928 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
const withTypeScript = require('expo-module-scripts/createJestPreset');
// Example: add a library to the list of compiled ECMAScript libs (three in this case)
function withTHREE(config) {
return {
...config,
transformIgnorePatterns: [
// The default transformIgnorePatterns from `jest-expo/jest-preset.js` but with `three` added
'node_modules/(?!(jest-)?react-native|three|react-clone-referenced-element|@react-native-community|expo(nent)?|@expo(nent)?/.*|react-navigation|@react-navigation/.*|@unimodules/.*|sentry-expo|native-base|react-native-svg)',
// We only want the modern js folder
'node_modules/three/examples/!jsm',
],
};
}
module.exports = {
projects: [
withTHREE(withTypeScript(require('jest-expo/android/jest-preset'))),
withTHREE(withTypeScript(require('jest-expo/ios/jest-preset'))),
withTHREE(withTypeScript(require('jest-expo/web/jest-preset'))),
],
};