diff --git a/tests/library/page-event-crash.spec.ts b/tests/library/page-event-crash.spec.ts index f9f20588f1..0d3b000bb2 100644 --- a/tests/library/page-event-crash.spec.ts +++ b/tests/library/page-event-crash.spec.ts @@ -17,7 +17,7 @@ import { contextTest as testBase, expect } from '../config/browserTest'; -const test = testBase.extend<{ crash: () => void }>({ +const test = testBase.extend<{ crash: () => void }, { dummy: string }>({ crash: async ({ page, toImpl, browserName }, run) => { run(() => { if (browserName === 'chromium') @@ -27,12 +27,11 @@ const test = testBase.extend<{ crash: () => void }>({ else if (browserName === 'firefox') toImpl(page)._delegate._session.send('Page.crash', {}).catch(e => {}); }); - } + }, + // Force a separate worker to avoid messing up with other tests. + dummy: ['', { scope: 'worker' }], }); -// Force a separate worker to avoid messing up with other tests. -test.use({ launchOptions: {} }); - test('should emit crash event when page crashes', async ({ page, crash }) => { await page.setContent(`