first commit
This commit is contained in:
@@ -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()");
|
||||
});
|
||||
Reference in New Issue
Block a user