update tests

This commit is contained in:
Sharon Kennedy
2020-09-06 15:24:41 -04:00
parent 91bec23c48
commit dbbe188adc
3 changed files with 30 additions and 20 deletions

View File

@@ -24,7 +24,13 @@ export const mockInitCrypto = jest.fn()
export const mockStartClient = jest.fn(() => {
return Promise.resolve('value');
});
export const mockOnce = jest.fn()
export const mockOnce = jest
.fn()
.mockImplementation((event, callback) => {
if (event === 'sync') {
callback('PREPARED')
}
})
export const mockStopClient = jest.fn(() => {
return Promise.resolve('value');
});