Skip to content

Commit

Permalink
cherry-pick(release-1.120: do not fail when removing non-existent vid…
Browse files Browse the repository at this point in the history
…eo (#7072)

Cherry-Pick #7060 SHA e4d93cd

Fixes #7058

Co-authored-by: Pavel Feldman <pavel.feldman@gmail.com>
  • Loading branch information
aslushnikov and pavelfeldman committed Jun 11, 2021
1 parent 4c807b3 commit 9c07499
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 9c07499

Please sign in to comment.