mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-18 22:05:06 +08:00
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:
committed by
Facebook Github Bot
parent
2e1707d0e6
commit
11a2a35c63
@@ -142,6 +142,12 @@ const mockNativeModules = {
|
||||
scale: 2,
|
||||
width: 750,
|
||||
},
|
||||
screen: {
|
||||
fontScale: 2,
|
||||
height: 1334,
|
||||
scale: 2,
|
||||
width: 750,
|
||||
},
|
||||
},
|
||||
},
|
||||
FacebookSDK: {
|
||||
|
||||
Reference in New Issue
Block a user