Skip to content

Commit 246665a

Browse files
test(web): bundled dev fixture copies the chunk reload guard bootstrap now imports
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 9797a2f commit 246665a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎apps/web/src/bundledDev.test.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ it("initializes React refresh before a shared UI chunk runs in bundled dev", asy
2626
try {
2727
await NodeFSP.mkdir(NodePath.join(root, "src/lib"), { recursive: true });
2828
await NodeFSP.writeFile(NodePath.join(root, "package.json"), '{"type":"module"}');
29-
for (const file of ["index.html", "src/bootstrap.ts", "src/lib/bootError.ts"]) {
29+
for (const file of [
30+
"index.html",
31+
"src/bootstrap.ts",
32+
"src/lib/bootError.ts",
33+
"src/lib/chunkReloadGuard.ts",
34+
]) {
3035
await NodeFSP.copyFile(new URL(`../${file}`, import.meta.url), NodePath.join(root, file));
3136
}
3237
await NodeFSP.writeFile(
@@ -94,6 +99,7 @@ export const startup = Promise.resolve().then(() => globalThis.onStarted(Shared(
9499
`import assert from "node:assert/strict";
95100
const started = Promise.withResolvers();
96101
globalThis.window = globalThis;
102+
globalThis.addEventListener = () => {};
97103
globalThis.document = {
98104
createElement: () => ({ relList: { supports: () => true } }),
99105
getElementById: () => null,

0 commit comments

Comments
 (0)