Skip to content

Commit a50f736

Browse files
MarcoScabbiolofacebook-github-bot
authored andcommitted
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: #29223 Test Plan: None Reviewed By: cpojer Differential Revision: D22279962 Pulled By: TheSavior fbshipit-source-id: 667cecb0a558a4267564702ee9d30380756bdd92
1 parent 66057ef commit a50f736

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jest/setup.js

+4
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ jest
211211
};
212212
},
213213
},
214+
DevSettings: {
215+
addMenuItem: jest.fn(),
216+
reload: jest.fn(),
217+
},
214218
ImageLoader: {
215219
getSize: jest.fn(url => Promise.resolve({width: 320, height: 240})),
216220
prefetchImage: jest.fn(),

0 commit comments

Comments
 (0)