From c7a4a336411a03b8029a559226060546ce2986dd Mon Sep 17 00:00:00 2001 From: Will Harney Date: Wed, 27 Nov 2024 14:49:23 -0500 Subject: [PATCH] test(ssr): fix sync mode flag to work with concurrency --- packages/@lwc/engine-server/src/__tests__/fixtures.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@lwc/engine-server/src/__tests__/fixtures.spec.ts b/packages/@lwc/engine-server/src/__tests__/fixtures.spec.ts index 0130ad2a19..3c542787c5 100755 --- a/packages/@lwc/engine-server/src/__tests__/fixtures.spec.ts +++ b/packages/@lwc/engine-server/src/__tests__/fixtures.spec.ts @@ -6,7 +6,7 @@ */ import path from 'node:path'; -import { vi, describe, beforeEach, afterEach } from 'vitest'; +import { vi, describe, beforeAll, afterAll } from 'vitest'; import { rollup } from 'rollup'; import lwcRollupPlugin from '@lwc/rollup-plugin'; import { testFixtureDir, formatHTML } from '@lwc/test-utils-lwc-internals'; @@ -163,13 +163,13 @@ function testFixtures(options?: RollupLwcOptions) { } describe.concurrent('fixtures', () => { - beforeEach(() => { + beforeAll(() => { // ENABLE_WIRE_SYNC_EMIT is used because this mimics the behavior for LWR in SSR mode. It's also more reasonable // for how both `engine-server` and `ssr-runtime` behave, which is to use sync rendering. setFeatureFlagForTest('ENABLE_WIRE_SYNC_EMIT', true); }); - afterEach(() => { + afterAll(() => { setFeatureFlagForTest('ENABLE_WIRE_SYNC_EMIT', false); });