Skip to content

Commit

Permalink
adding logs
Browse files Browse the repository at this point in the history
  • Loading branch information
BatMiles committed Jul 23, 2024
1 parent 7a662a6 commit 890e190
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,14 @@ const deleteFolderRecursive = path => {
export const closeBrowser = async (browser) => {
console.log("closing browser");
const pages = await browser.pages();
console.log(`closing ${pages.count} pages`);
for (let i = 0; i < pages.length; i++) {
await pages[i].close();
console.log('closed page');
}
console.log("before closing browser");
await browser.close();
console.log("after closing browser");
};

export const clearDir = (outDir, mkNewDir = true) => {
Expand Down

0 comments on commit 890e190

Please sign in to comment.