aboutsummaryrefslogtreecommitdiff
path: root/test/manual/ipc-server-test.ts
diff options
context:
space:
mode:
authoramankumarsingh77 <amankumarsingh7702@gmail.com>2026-07-27 00:13:06 +0530
committerAman Kumar <145339995+amankumarsingh77@users.noreply.github.com>2026-08-02 19:12:46 +0530
commit3607b5523f9d23ec6b9facf8474c7bdf047537e1 (patch)
tree87c433788599b1f414cb248759f2eed6500071e2 /test/manual/ipc-server-test.ts
parent84ebb018f59ab5efe8bc97e8e4b87435d6665b0b (diff)
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) <noreply@anthropic.com>
Diffstat (limited to 'test/manual/ipc-server-test.ts')
-rw-r--r--test/manual/ipc-server-test.ts9
1 files changed, 6 insertions, 3 deletions
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<void>((resolve) => socket2.on("connect", resolve));
socket2.write(JSON.stringify({ type: "control", action: "register", clientId: TEST_CLIENT_ID }) + "\n");