Permalink
Browse files

Fix Jest mocks for Dimensions module

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 11a2a35c63ae68de46482f5cd25271f8b0fb5ad4
Showing with 6 additions and 0 deletions.
  1. +6 −0 jest/setup.js
View
@@ -142,6 +142,12 @@ const mockNativeModules = {
scale: 2,
width: 750,
},
screen: {
fontScale: 2,
height: 1334,
scale: 2,
width: 750,
},
},
},
FacebookSDK: {

0 comments on commit 11a2a35

Please sign in to comment.