Commit ab788ee7 authored by Robert Knight's avatar Robert Knight

Add test to verify that `call` rejects if `postMessage` throws

parent b6f3ba5b
......@@ -53,6 +53,14 @@ describe('sidebar.util.postmessage-json-rpc', () => {
});
});
it('rejects if `postMessage` fails', () => {
frame.postMessage.throws(new Error('Nope!'));
const result = doCall();
assertPromiseIsRejected(result, 'Nope!');
});
[{
// Wrong origin.
origin: 'https://not-the-embedder.com',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment