Skip to content

Commit 2193527

Browse files
fix: avoid browser esm test dist race
Rely on the pre-test build output instead of rebuilding package dist inside a parallel Vitest worker. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent fbf3695 commit 2193527

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

tests/browser-esm-private-child-elements.test.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import { execFileSync } from 'node:child_process';
21
import { readFile } from 'node:fs/promises';
32
import { dirname, join } from 'node:path';
43
import { pathToFileURL } from 'node:url';
54
import { globSync } from 'glob';
6-
import { beforeAll } from 'vitest';
75

86
type PrivateChildCase = {
97
slug: string;
@@ -61,15 +59,6 @@ async function importBuiltView(path: string): Promise<void> {
6159
describe('browser ESM private child custom elements', () => {
6260
const root = process.cwd();
6361

64-
beforeAll(() => {
65-
for (const { slug } of cases) {
66-
execFileSync('bun', ['run', '--cwd', `packages/elements-react/${slug}`, 'build'], {
67-
cwd: root,
68-
stdio: 'pipe',
69-
});
70-
}
71-
}, 60_000);
72-
7362
test('shared browser build preserves package-owned private child registration', async () => {
7463
const browserConfig = await readFile(
7564
join(root, 'tools/vite/element-browser.config.ts'),

0 commit comments

Comments
 (0)