mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 14:11:50 +03:00
test: unflake launcher test (#2224)
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.
This commit is contained in:
parent
03cae92ff2
commit
884860b803
@ -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);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user