diff --git a/src/infra/agent-events.test.ts b/src/infra/agent-events.test.ts index fc98135dcd7..5875e9d7170 100644 --- a/src/infra/agent-events.test.ts +++ b/src/infra/agent-events.test.ts @@ -189,13 +189,13 @@ describe("agent-events sequencing", () => { seen.push(evt.runId); }); - expect(() => + expect( emitAgentEvent({ runId: "run-safe", stream: "assistant", data: { text: "hi" }, }), - ).not.toThrow(); + ).toBeUndefined(); stopGood(); stopBad(); diff --git a/src/infra/channel-runtime-context.test.ts b/src/infra/channel-runtime-context.test.ts index f458515d11d..19a784afde4 100644 --- a/src/infra/channel-runtime-context.test.ts +++ b/src/infra/channel-runtime-context.test.ts @@ -35,7 +35,7 @@ describe("channel runtime context helpers", () => { const scoped = createTaskScopedChannelRuntime({}); expect(scoped.channelRuntime).toBeUndefined(); - expect(() => scoped.dispose()).not.toThrow(); + expect(scoped.dispose()).toBeUndefined(); }); it("disposes only task-scoped registrations", () => { diff --git a/src/infra/outbound/outbound-policy.test.ts b/src/infra/outbound/outbound-policy.test.ts index 6eebc676362..2449d968458 100644 --- a/src/infra/outbound/outbound-policy.test.ts +++ b/src/infra/outbound/outbound-policy.test.ts @@ -99,7 +99,7 @@ function expectCrossContextPolicyResult(params: { }, }); if (params.expected === "allow") { - expect(run).not.toThrow(); + expect(run()).toBeUndefined(); return; } expect(run).toThrow(params.expected); diff --git a/src/infra/skills-remote.test.ts b/src/infra/skills-remote.test.ts index af26a7ed6d7..11acd3f62e8 100644 --- a/src/infra/skills-remote.test.ts +++ b/src/infra/skills-remote.test.ts @@ -40,10 +40,8 @@ describe("skills-remote", () => { it("supports idempotent remote node removal", () => { const nodeId = `node-${randomUUID()}`; - expect(() => { - removeRemoteNodeInfo(nodeId); - removeRemoteNodeInfo(nodeId); - }).not.toThrow(); + expect(removeRemoteNodeInfo(nodeId)).toBeUndefined(); + expect(removeRemoteNodeInfo(nodeId)).toBeUndefined(); }); it("bumps the skills snapshot version when an eligible remote node disconnects", async () => { diff --git a/src/plugins/channel-catalog-registry.test.ts b/src/plugins/channel-catalog-registry.test.ts index 3ab563afd42..4d0427f5b0e 100644 --- a/src/plugins/channel-catalog-registry.test.ts +++ b/src/plugins/channel-catalog-registry.test.ts @@ -111,7 +111,7 @@ describe("listChannelCatalogEntries", () => { }, }); - expect(() => module.listChannelCatalogEntries({ env: ENV })).not.toThrow(); + expect(module.listChannelCatalogEntries({ env: ENV })).toEqual([]); expect(loadRecordsSpy).toHaveBeenCalledTimes(1); expect(discoverSpy).toHaveBeenCalledTimes(1); diff --git a/src/plugins/stage-bundled-plugin-runtime.test.ts b/src/plugins/stage-bundled-plugin-runtime.test.ts index b8d01ab3179..c9b8dd27d06 100644 --- a/src/plugins/stage-bundled-plugin-runtime.test.ts +++ b/src/plugins/stage-bundled-plugin-runtime.test.ts @@ -518,7 +518,7 @@ describe("stageBundledPluginRuntime", () => { return realSymlinkSync(String(target), linkPath, type); }) as typeof fs.symlinkSync); - expect(() => stageBundledPluginRuntime({ repoRoot })).not.toThrow(); + stageBundledPluginRuntime({ repoRoot }); const runtimeAssetPath = path.join( repoRoot,