Skip to content

Commit

Permalink
test: add coverage for onMessage nativeEvent field
Browse files Browse the repository at this point in the history
See #15
  • Loading branch information
jsamr committed Sep 1, 2021
1 parent d89f11c commit 39e54d7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/webshell/src/__tests__/make-webshell.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,13 @@ describe('Webshell component', () => {
)
);
expect(onDOMDummyOption).toHaveBeenCalledWith({ foo: 'bar' });
expect(onMessage).toHaveBeenCalledTimes(1);
expect(onMessage).toHaveBeenCalledWith(
expect.objectContaining({
nativeEvent: expect.objectContaining({
data: 'test'
})
})
);
});
it('it should provide a reference to the inner WebView', async () => {
const Webshell = makeWebshell(Ersatz);
Expand Down

0 comments on commit 39e54d7

Please sign in to comment.