mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
parent
3481f03b80
commit
f0b11ad22e
@ -389,6 +389,9 @@ describe('Page', function() {
|
||||
const result = await page.evaluate((a, b) => Object.is(a, undefined) && Object.is(b, 'foo'), undefined, 'foo');
|
||||
expect(result).toBe(true);
|
||||
});
|
||||
it('should properly serialize null fields', async({page}) => {
|
||||
expect(await page.evaluate(() => ({a: undefined}))).toEqual({});
|
||||
});
|
||||
it('should fail for window object', async({page, server}) => {
|
||||
const result = await page.evaluate(() => window);
|
||||
expect(result).toBe(undefined);
|
||||
|
Loading…
Reference in New Issue
Block a user