Skip to content

Commit

Permalink
Add React name mapping to the preset
Browse files Browse the repository at this point in the history
Summary:
Fixes breakage on https://circleci.com/gh/facebook/react-native/12763 after the upgrade of React

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Jest preset has been upgraded so that requiring `React` capitalized can be possible

**Test plan (required)**

Couldn't reproduce it locally, we need to see if Circle passes.
Closes #10749

Differential Revision: D4132150

Pulled By: bestander

fbshipit-source-id: e41fb95b6677113fc6a3bf8bbce9247f59aa81dd
  • Loading branch information
kentaromiura authored and Facebook Github Bot committed Nov 5, 2016
1 parent e173f14 commit 97d90a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jest-preset.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
},
"moduleNameMapper": {
"^image![a-zA-Z0-9$_-]+$": "GlobalImageStub",
"^[./a-zA-Z0-9$_-]+\\.(bmp|gif|jpg|jpeg|png|psd|svg|webp)$": "RelativeImageStub"
"^[./a-zA-Z0-9$_-]+\\.(bmp|gif|jpg|jpeg|png|psd|svg|webp)$": "RelativeImageStub",
"^React$": "<rootDir>node_modules/react"
},
"modulePathIgnorePatterns": [
"<rootDir>/node_modules/react-native/Libraries/react-native/",
Expand Down

0 comments on commit 97d90a1

Please sign in to comment.