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:
Marco Scabbiolo
2020-06-28 23:46:20 -07:00
committed by Facebook GitHub Bot
parent 66057efc6d
commit a50f736bb6
+4
View File
@@ -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(),