From 3607b5523f9d23ec6b9facf8474c7bdf047537e1 Mon Sep 17 00:00:00 2001 From: amankumarsingh77 Date: Mon, 27 Jul 2026 00:13:06 +0530 Subject: chore(build): split tsconfig, typecheck tests, add node:test runner test/ was never type-checked and had no runner. Adds tsconfig.base.json shared by a src project and a test project, an npm test script scoped to non-manual suites, and a CI step. Ports the profile store suite as proof. Co-Authored-By: Claude Opus 5 (1M context) --- test/manual/ipc-server-test.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'test/manual/ipc-server-test.ts') diff --git a/test/manual/ipc-server-test.ts b/test/manual/ipc-server-test.ts index a267a45..b4da3df 100644 --- a/test/manual/ipc-server-test.ts +++ b/test/manual/ipc-server-test.ts @@ -7,7 +7,7 @@ import { createConnection } from "node:net"; import { createInterface } from "node:readline"; import { createIpcServer } from "../../src/daemon/server"; import { DAEMON_SOCKET_PATH } from "../../src/daemon/protocol"; -import type { WireMessage } from "../../src/daemon/protocol"; +import type { WireEvent, WireMessage } from "../../src/daemon/protocol"; const TEST_CLIENT_ID = "pi-test-001"; @@ -76,7 +76,11 @@ async function main() { // ── Test 4: Broadcast ───────────────────────────────────────────────── receivedByClient.length = 0; - const broadcastMsg = { type: "event", method: "Target.targetCreated", params: { targetInfo: { type: "page" } } }; + const broadcastMsg: WireEvent = { + type: "event", + method: "Target.targetCreated", + params: { targetInfo: { type: "page" } }, + }; server.broadcast(broadcastMsg); await sleep(200); @@ -93,7 +97,6 @@ async function main() { // ── Test 6: Re-registration (same clientId after disconnect) ────────── const socket2 = createConnection(DAEMON_SOCKET_PATH); - const rl2 = createInterface({ input: socket2, crlfDelay: Infinity }); await new Promise((resolve) => socket2.on("connect", resolve)); socket2.write(JSON.stringify({ type: "control", action: "register", clientId: TEST_CLIENT_ID }) + "\n"); -- cgit v1.2.3