diff --git a/test/test.js b/test/test.js index c3e98d03ea0..85ed939a9db 100644 --- a/test/test.js +++ b/test/test.js @@ -160,7 +160,7 @@ describe('Puppeteer', function() { const page = await browser.newPage(); let error = null; const neverResolves = page.evaluate(() => new Promise(r => {})).catch(e => error = e); - browser.close(); + await browser.close(); await neverResolves; expect(error.message).toContain('Protocol error'); });