Skip to content

Commit

Permalink
[jest-expo] fix jest-preset mutating react-native preset
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-fournier committed Jul 1, 2020
1 parent 9cb8d10 commit 533b638
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/jest-expo/jest-preset.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
'use strict';

const isEqual = require('lodash/isEqual');
const cloneDeep = require('lodash/cloneDeep');
// Derive the Expo Jest preset from the React Native one
const jestPreset = require('react-native/jest-preset');
const jestPresetOrigin = require('react-native/jest-preset');
const jestPreset = cloneDeep(jestPresetOrigin);

// transform
if (!jestPreset.transform) {
Expand Down

0 comments on commit 533b638

Please sign in to comment.