Skip to content

Commit

Permalink
viewer: Minor test improvements (#26906)
Browse files Browse the repository at this point in the history
Make test aware of some console errors when expected.
  • Loading branch information
mdmower committed Feb 23, 2020
1 parent 5721bc4 commit 337898b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/unit/test-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,7 @@ describes.sandboxed('Viewer', {}, env => {
});

it('should post broadcast event but not fail w/o messaging', () => {
expectAsyncConsoleError(/No messaging channel/);
const result = viewer.broadcast({type: 'type1'});
expect(viewer.messageQueue_.length).to.equal(0);
clock.tick(20001);
Expand Down Expand Up @@ -728,6 +729,7 @@ describes.sandboxed('Viewer', {}, env => {
});

it('should timeout messaging channel', () => {
expectAsyncConsoleError(/No messaging channel/);
let mResolved = false;
const m = viewer.sendMessageAwaitResponse('event', {}).then(() => {
mResolved = true;
Expand Down

0 comments on commit 337898b

Please sign in to comment.