diff --git a/tests/library/video.spec.ts b/tests/library/video.spec.ts index 5ab55056d22e74..55b97f2f804067 100644 --- a/tests/library/video.spec.ts +++ b/tests/library/video.spec.ts @@ -324,7 +324,7 @@ it.describe('screencast', () => { const page = await context.newPage(); const videoPath = await page.video()!.path(); await context.close(); - expect(fs.existsSync(await page.video()!.path())).toBeTruthy(); + expect(fs.existsSync(videoPath)).toBeTruthy(); }); it('should expose video path blank popup', async ({ browser }, testInfo) => {