import "./public-path";

it("should prefetch correctly", () => {
	expect(document.head._children).toHaveLength(1);

	// Test prefetch from entry chunk
	const link = document.head._children[0];
	expect(link._type).toBe("link");
	expect(link.rel).toBe("prefetch");
	expect(link.href).toBe("https://example.com/public/path/chunk1.js");

	import(/* webpackChunkName: "chunk1", webpackPrefetch: true */ "./chunk1");
});

@@ -327,16 +327,44 @@
 .js%22);%0A%0A
+%09if (Math.random() %3C -1) %7B%0A%09
 %09import(
@@ -432,12 +432,15 @@
 unk1%22);%0A
+%09%7D%0A
 %7D);%0A

fix test case