From beb276a2be819182ef957444c6798353e76bbdf7 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 8 Jun 2022 14:16:09 -0700 Subject: [PATCH] test: close context created in the test (#14719) --- tests/library/video.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/library/video.spec.ts b/tests/library/video.spec.ts index eaefc7dc4c..fc6735e9fb 100644 --- a/tests/library/video.spec.ts +++ b/tests/library/video.spec.ts @@ -222,7 +222,7 @@ it.describe('screencast', () => { expect(fs.existsSync(path)).toBeTruthy(); }); - it('saveAs should throw when no video frames', async ({ browser, browserName }, testInfo) => { + it('saveAs should throw when no video frames', async ({ browser }, testInfo) => { const videosPath = testInfo.outputPath(''); const size = { width: 320, height: 240 }; const context = await browser.newContext({ @@ -249,6 +249,7 @@ it.describe('screencast', () => { // and other browsers are sometimes fast as well. if (!fs.existsSync(saveAsPath)) expect(error.message).toContain('Page did not produce any video frames'); + await context.close(); }); it('should delete video', async ({ browser }, testInfo) => {