test: make init script test strict again (#5877)
This commit is contained in:
parent
c4410d3f4d
commit
c68bd31053
|
|
@ -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}) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue