Skip to content

Commit

Permalink
fix(video): do not fail when removing non-existent video (microsoft#7060
Browse files Browse the repository at this point in the history
)
  • Loading branch information
pavelfeldman authored Jun 11, 2021
1 parent f52290d commit e4d93cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ export const test = _baseTest.extend<PlaywrightTestArgs & PlaywrightTestOptions,
const video = page.video();
if (!video)
return;
const videoPath = await video.path();
await fs.promises.unlink(videoPath).catch(e => {});
try {
const videoPath = await video.path();
await fs.promises.unlink(videoPath);
} catch (e) {
// Silent catch.
}
}));
}
},
Expand Down

0 comments on commit e4d93cd

Please sign in to comment.