close all pages to avoid EPERM error on Windows 10 (#830)
This commit is contained in:
@@ -139,6 +139,8 @@ function getCode() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
emitter.once('done', async (shouldReplay) => {
|
emitter.once('done', async (shouldReplay) => {
|
||||||
|
const pages = await browser.pages();
|
||||||
|
await Promise.all(pages.map((page) => page.close()));
|
||||||
await browser.close();
|
await browser.close();
|
||||||
if (shouldReplay) {
|
if (shouldReplay) {
|
||||||
await replay(url, shouldReplay === 'replayWithFakeURL');
|
await replay(url, shouldReplay === 'replayWithFakeURL');
|
||||||
|
|||||||
Reference in New Issue
Block a user