mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
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 New Issue
Block a user