Skip to content

Commit

Permalink
test(ssr): fix sync mode flag to work with concurrency (#4982)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjhsf authored Dec 2, 2024
1 parent 19b11e4 commit d73ee61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/@lwc/engine-server/src/__tests__/fixtures.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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);
});

Expand Down

0 comments on commit d73ee61

Please sign in to comment.