Skip to content

Commit

Permalink
test: unflake launcher test (#2224)
Browse files Browse the repository at this point in the history
We throw an exception and then gracefully close the browser.
If something went wrong, we should timeout before the test times out,
kill the process and report the original exception.
  • Loading branch information
dgozman committed May 14, 2020
1 parent 03cae92 commit 884860b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/launcher.spec.js
Expand Up @@ -58,7 +58,7 @@ describe('Playwright', function() {
});
it('should handle exception', async({browserType, defaultBrowserOptions}) => {
const e = new Error('Dummy');
const options = { ...defaultBrowserOptions, __testHookBeforeCreateBrowser: () => { throw e; } };
const options = { ...defaultBrowserOptions, __testHookBeforeCreateBrowser: () => { throw e; }, timeout: 9000 };
const error = await browserType.launch(options).catch(e => e);
expect(error).toBe(e);
});
Expand Down

0 comments on commit 884860b

Please sign in to comment.