first commit

This commit is contained in:
Clintchiz committed 2026-07-12 15:55:18 +05:30
commit ee98026cc5
404 files changed
+44522

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
import { expect, test } from "bun:test";
import { HMR_CLIENT_JS } from "../src/runtime.ts";
test("HMR client syncs fresh HTML over the websocket", () => {
expect(HMR_CLIENT_JS).toContain('send({ type: "sync"');
expect(HMR_CLIENT_JS).toContain('msg.type === "html"');
expect(HMR_CLIENT_JS).toContain("applyHtml(msg.html)");
expect(HMR_CLIENT_JS).not.toContain("fetch(location.href");
expect(HMR_CLIENT_JS).not.toContain("location.reload()");
});