Skip to content

Commit

Permalink
test: make init script test strict again (#5877)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed Mar 18, 2021
1 parent c4410d3 commit c68bd31
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/browsercontext-expose-function.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ it('should be callable from-inside addInitScript', async ({context, server}) =>
});
await context.addInitScript('window["woof"]("context")');
const page = await context.newPage();
await page.addInitScript('window["woof"]("page")');
await page.evaluate('undefined');
expect(args).toEqual(['context']);
args = [];
await page.addInitScript('window["woof"]("page")');
await page.reload();
expect(args).toContain('context');
expect(args).toContain('page');
expect(args).toEqual(['context', 'page']);
});

it('exposeBindingHandle should work', async ({context}) => {
Expand Down

0 comments on commit c68bd31

Please sign in to comment.