UNPKG

928 BJavaScriptView Raw
1const withTypeScript = require('expo-module-scripts/createJestPreset');
2
3// Example: add a library to the list of compiled ECMAScript libs (three in this case)
4function withTHREE(config) {
5 return {
6 ...config,
7 transformIgnorePatterns: [
8 // The default transformIgnorePatterns from `jest-expo/jest-preset.js` but with `three` added
9 '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)',
10 // We only want the modern js folder
11 'node_modules/three/examples/!jsm',
12 ],
13 };
14}
15
16module.exports = {
17 projects: [
18 withTHREE(withTypeScript(require('jest-expo/android/jest-preset'))),
19 withTHREE(withTypeScript(require('jest-expo/ios/jest-preset'))),
20 withTHREE(withTypeScript(require('jest-expo/web/jest-preset'))),
21 ],
22};