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();
|
const video = page.video();
|
||||||
if (!video)
|
if (!video)
|
||||||
return;
|
return;
|
||||||
const videoPath = await video.path();
|
try {
|
||||||
await fs.promises.unlink(videoPath).catch(e => {});
|
const videoPath = await video.path();
|
||||||
|
await fs.promises.unlink(videoPath);
|
||||||
|
} catch (e) {
|
||||||
|
// Silent catch.
|
||||||
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue