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 https://github.com/facebook/react-native/pull/17017

Differential Revision: D6471719

Pulled By: TheSavior

fbshipit-source-id: de27b2819d088fefe20dfca94ab5672fdec5f0e1
This commit is contained in:
uk-ar 2017-12-03 16:34:26 -08:00 committed by Facebook Github Bot
parent 2e1707d0e6
commit 11a2a35c63
1 changed files with 6 additions and 0 deletions

View File

@ -142,6 +142,12 @@ const mockNativeModules = {
scale: 2,
width: 750,
},
screen: {
fontScale: 2,
height: 1334,
scale: 2,
width: 750,
},
},
},
FacebookSDK: {