Skip to content

Commit

Permalink
Fix Jest mocks for Dimensions module
Browse files Browse the repository at this point in the history
Summary:
Jest mock for Dimensions.get("screen") is missing. Tests fail with error message:

    Invariant Violation: No dimension set for key screen

Run test with usage of Dimensions.get("screen")

[GENERAL] [BUGFIX] [jest/setup.js] - Fix Jest mocks for Dimensions module
Closes #17017

Differential Revision: D6471719

Pulled By: TheSavior

fbshipit-source-id: de27b2819d088fefe20dfca94ab5672fdec5f0e1
  • Loading branch information
uk-ar authored and facebook-github-bot committed Dec 4, 2017
1 parent 2e1707d commit 11a2a35
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions jest/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ const mockNativeModules = {
scale: 2,
width: 750,
},
screen: {
fontScale: 2,
height: 1334,
scale: 2,
width: 750,
},
},
},
FacebookSDK: {
Expand Down

0 comments on commit 11a2a35

Please sign in to comment.