diff --git a/test/page.spec.js b/test/page.spec.js index e45e7707..cf78ce1c 100644 --- a/test/page.spec.js +++ b/test/page.spec.js @@ -656,6 +656,13 @@ module.exports.addTests = function({testRunner, expect, headless, puppeteer, CHR }); expect(result).toBe(15); }); + it('should work with complex objects', async({page, server}) => { + await page.exposeFunction('complexObject', function(a, b) { + return {x: a.x + b.x}; + }); + const result = await page.evaluate(async() => complexObject({x: 5}, {x: 2})); + expect(result.x).toBe(7); + }); }); describe('Page.Events.PageError', function() {