cherry-pick(release-1.120: do not fail when removing non-existent video (#7072)
Cherry-Pick #7060 SHA e4d93cd1f3
Fixes #7058
Co-authored-by: Pavel Feldman <pavel.feldman@gmail.com>
This commit is contained in:
parent
4c807b3e62
commit
9c07499f2e
|
|
@ -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.
|
||||
}
|
||||
}));
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue