mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add DevSettings to jest preset (#29223)
Summary: Provide a mocked `DevSettings` implementation for jest. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Added] - Add mock for `DevSettings` to jest preset Pull Request resolved: https://github.com/facebook/react-native/pull/29223 Test Plan: None Reviewed By: cpojer Differential Revision: D22279962 Pulled By: TheSavior fbshipit-source-id: 667cecb0a558a4267564702ee9d30380756bdd92
This commit is contained in:
committed by
Facebook GitHub Bot
parent
66057efc6d
commit
a50f736bb6
@@ -211,6 +211,10 @@ jest
|
||||
};
|
||||
},
|
||||
},
|
||||
DevSettings: {
|
||||
addMenuItem: jest.fn(),
|
||||
reload: jest.fn(),
|
||||
},
|
||||
ImageLoader: {
|
||||
getSize: jest.fn(url => Promise.resolve({width: 320, height: 240})),
|
||||
prefetchImage: jest.fn(),
|
||||
|
||||
Reference in New Issue
Block a user