chore: sync server.test.ts with upstream main
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0c7c9a446f
commit
0ffb7b3d82
@ -3,22 +3,14 @@ import { createServer } from "node:http";
|
||||
import type { AddressInfo } from "node:net";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
import { WebSocket } from "ws";
|
||||
import { rawDataToString } from "../infra/ws.js";
|
||||
import { defaultRuntime } from "../runtime.js";
|
||||
import {
|
||||
CANVAS_HOST_PATH,
|
||||
CANVAS_WS_PATH,
|
||||
injectCanvasLiveReload,
|
||||
resetA2uiCache,
|
||||
} from "./a2ui.js";
|
||||
import { CANVAS_HOST_PATH, CANVAS_WS_PATH, injectCanvasLiveReload } from "./a2ui.js";
|
||||
import { createCanvasHostHandler, startCanvasHost } from "./server.js";
|
||||
|
||||
describe("canvas host", () => {
|
||||
beforeEach(() => {
|
||||
resetA2uiCache();
|
||||
});
|
||||
it("injects live reload script", () => {
|
||||
const out = injectCanvasLiveReload("<html><body>Hello</body></html>");
|
||||
expect(out).toContain(CANVAS_WS_PATH);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user