From cce359ea83bc9ef6fc652969aba0f73eed971c82 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Tue, 9 Nov 2021 11:12:18 -0800 Subject: [PATCH] test: fix fixture teardown (#10174) --- tests/trace-viewer/trace-viewer.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/trace-viewer/trace-viewer.spec.ts b/tests/trace-viewer/trace-viewer.spec.ts index e0074f34d0..847f9efade 100644 --- a/tests/trace-viewer/trace-viewer.spec.ts +++ b/tests/trace-viewer/trace-viewer.spec.ts @@ -104,8 +104,8 @@ const test = playwrightTest.extend<{ showTraceViewer: (trace: string) => Promise browser = await playwright.chromium.connectOverCDP({ endpointURL: contextImpl._browser.options.wsEndpoint }); return new TraceViewerPage(browser.contexts()[0].pages()[0]); }); - await browser.close(); - await contextImpl._browser.close(); + await browser?.close(); + await contextImpl?._browser.close(); }, runAndTrace: async ({ context, showTraceViewer }, use, testInfo) => {