Skip to content

Commit

Permalink
Add DevSettings to jest preset (#29223)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
MarcoScabbiolo authored and facebook-github-bot committed Jun 29, 2020
1 parent 66057ef commit a50f736
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jest/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit a50f736

Please sign in to comment.