Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(ssr): fix sync mode flag to work with concurrency #4982

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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