Skip to content

Commit

Permalink
[jest-expo] Disable unsupported mjs file extensions (#8839)
Browse files Browse the repository at this point in the history
* [jest-expo] Disable unsupported mjs file extensions

* [jest-expo] Only disable mjs and enable typescript and react
  • Loading branch information
byCedric authored and tsapeta committed Jun 28, 2020
1 parent a75c5c5 commit 394e8d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/jest-expo/config/getPlatformPreset.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ const expoPreset = require('../jest-preset');
const { withWatchPlugins } = require('./withWatchPlugins');

function getPlatformPreset(displayOptions, extensions) {
const moduleFileExtensions = getManagedExtensions(extensions);
const moduleFileExtensions = getManagedExtensions(extensions, {
isTS: true,
isReact: true,
isModern: false,
});
const testMatch = ['', ...extensions].reduce((arr, cur) => {
const platformExtension = cur ? `.${cur}` : '';
const sourceExtension = `.[jt]s?(x)`;
Expand Down

0 comments on commit 394e8d9

Please sign in to comment.