From 68a15fc04b38926428da95de4e5620257aa265f7 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Mon, 17 May 2021 14:56:39 -0700 Subject: [PATCH] fix(tests): force a new worker for channels.spec (#6616) It has some global-state expectations that do not play nicely with reusing Browser between test files. --- tests/channels.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/channels.spec.ts b/tests/channels.spec.ts index 0746850d46..3b35283b51 100644 --- a/tests/channels.spec.ts +++ b/tests/channels.spec.ts @@ -18,6 +18,10 @@ import domain from 'domain'; import { playwrightTest as it, expect } from './config/browserTest'; +// Use something worker-scoped (e.g. launch args) to force a new worker for this file. +// Otherwise, a browser launched for other tests in this worker will affect the expectations. +it.use({ args: [] }); + it('should scope context handles', async ({browserType, browserOptions, server}) => { const browser = await browserType.launch(browserOptions); const GOLDEN_PRECONDITION = {