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")');
|
await context.addInitScript('window["woof"]("context")');
|
||||||
const page = await context.newPage();
|
const page = await context.newPage();
|
||||||
await page.addInitScript('window["woof"]("page")');
|
await page.evaluate('undefined');
|
||||||
|
expect(args).toEqual(['context']);
|
||||||
args = [];
|
args = [];
|
||||||
|
await page.addInitScript('window["woof"]("page")');
|
||||||
await page.reload();
|
await page.reload();
|
||||||
expect(args).toContain('context');
|
expect(args).toEqual(['context', 'page']);
|
||||||
expect(args).toContain('page');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('exposeBindingHandle should work', async ({context}) => {
|
it('exposeBindingHandle should work', async ({context}) => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue