fix(video): do not fail when removing non-existent video (#7060)
This commit is contained in:
parent
f52290d4ea
commit
e4d93cd1f3
|
|
@ -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