docs(test-advanced): add missing browser.close() (#19884)

https://github.com/microsoft/playwright/issues/19822
This commit is contained in:
Max Schmitt 2023-01-05 20:00:27 +01:00 committed by GitHub
parent ddccb59093
commit ef877dadfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -410,12 +410,12 @@ async function globalSetup(config: FullConfig) {
await context.tracing.stop({
path: './test-results/setup-trace.zip',
})
await page.close();
await browser.close();
} catch (error) {
await context.tracing.stop({
path: './test-results/failed-setup-trace.zip',
});
await page.close();
await browser.close();
throw error;
}
}