Skip to content

Commit

Permalink
fix: test in test/page.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
OrKoN committed Feb 17, 2022
1 parent 9ad896b commit ee22219
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions test/page.spec.ts
Expand Up @@ -1045,15 +1045,11 @@ describe('Page', function () {
});
await utils.detachFrame(page, 'frame1');

let result = undefined;
expect(
(async () => {
result = await page.evaluate(async function () {
return await globalThis.compute(3, 5);
});
})()
).not.toThrow();
expect(result).toBe(15);
await expect(
page.evaluate(async function () {
return await globalThis.compute(3, 5);
})
).resolves.toEqual(15);
});
it('should work with complex objects', async () => {
const { page } = getTestState();
Expand Down

0 comments on commit ee22219

Please sign in to comment.