TST: Add mock

This commit is contained in:
Marcos Rodriguez Vélez 2021-08-03 13:14:32 -04:00
parent 735f8452f7
commit a08bea2928
2 changed files with 8 additions and 1 deletions

View file

@ -2,7 +2,7 @@ function WidgetCommunication(props) {
WidgetCommunication.isBalanceDisplayAllowed = () => {};
WidgetCommunication.setBalanceDisplayAllowed = () => {};
WidgetCommunication.reloadAllTimelines = () => {};
return new WidgetCommunication();
return null;
}
export default WidgetCommunication;

View file

@ -152,6 +152,13 @@ jest.mock('react-native-widget-center', () => {
};
});
jest.mock('../blue_modules/WidgetCommunication', () => {
return {
reloadAllTimelines: jest.fn(),
};
});
const keychainMock = {
SECURITY_LEVEL_ANY: 'MOCK_SECURITY_LEVEL_ANY',
SECURITY_LEVEL_SECURE_SOFTWARE: 'MOCK_SECURITY_LEVEL_SECURE_SOFTWARE',