mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-12 17:33:15 +08:00
Fix Jest mocks
Summary: Since we started relying on NativeModules' getConstants() method to access constants, we need to update our jest mocks of these NativeModules, so that the tests still pass. I do that in this diff. Reviewed By: fkgozali Differential Revision: D13561376 fbshipit-source-id: eaef3de82d842fd97d04be741d55bdded73c6a11
This commit is contained in:
committed by
Facebook Github Bot
parent
3fae388424
commit
9db0050635
@@ -115,6 +115,12 @@ const mockNativeModules = {
|
||||
BuildInfo: {
|
||||
appVersion: '0',
|
||||
buildVersion: '0',
|
||||
getConstants() {
|
||||
return {
|
||||
appVersion: '0',
|
||||
buildVersion: '0',
|
||||
};
|
||||
},
|
||||
},
|
||||
Clipboard: {
|
||||
setString: jest.fn(),
|
||||
|
||||
Reference in New Issue
Block a user