diff --git a/src/cli/completion-cli.write-state.test.ts b/src/cli/completion-cli.write-state.test.ts index c50ccce7ada..5f999a1cbf1 100644 --- a/src/cli/completion-cli.write-state.test.ts +++ b/src/cli/completion-cli.write-state.test.ts @@ -94,7 +94,7 @@ describe("completion-cli write-state", () => { await program.parseAsync(["completion", "--write-state"], { from: "user" }); const cacheDir = path.join(stateDir, "completions"); - expect((await fs.readdir(cacheDir)).sort()).toEqual([ + expect((await fs.readdir(cacheDir)).toSorted()).toEqual([ "openclaw.bash", "openclaw.fish", "openclaw.ps1", @@ -137,7 +137,7 @@ describe("completion-cli write-state", () => { [program, "qa", process.argv, { purpose: "completion" }], ]); expect(registerPluginCliCommandsFromValidatedConfigMock).not.toHaveBeenCalled(); - expect((await fs.readdir(path.join(stateDir, "completions"))).sort()).toEqual([ + expect((await fs.readdir(path.join(stateDir, "completions"))).toSorted()).toEqual([ "openclaw.bash", "openclaw.fish", "openclaw.ps1", diff --git a/src/gateway/gateway-stability.test.ts b/src/gateway/gateway-stability.test.ts index 375d3caa660..41e05cf3a6b 100644 --- a/src/gateway/gateway-stability.test.ts +++ b/src/gateway/gateway-stability.test.ts @@ -124,10 +124,8 @@ describe("gateway stability lane", () => { expect(lastSeq).toBeGreaterThan(firstSeq); expect(snapshot.summary.byType["diagnostic.memory.sample"]).toBeGreaterThan(0); expect(snapshot.summary.byType["message.queued"]).toBeGreaterThan(0); - expect(snapshot.summary.memory).toMatchObject({ - maxRssBytes: maxSyntheticRssBytes, - pressureCount: 0, - }); + expect(snapshot.summary.memory?.maxRssBytes).toBe(maxSyntheticRssBytes); + expect(snapshot.summary.memory?.pressureCount).toBe(0); expect(snapshot.summary.memory?.maxHeapUsedBytes).toBeLessThan(96 * MB); expect(snapshot.summary.payloadLarge?.chunked).toBeGreaterThan(0); expect(snapshot.summary.payloadLarge?.bySurface["gateway.stability.probe"]).toBeGreaterThan(0); diff --git a/src/gateway/openresponses-phase.test.ts b/src/gateway/openresponses-phase.test.ts index 69aa7886b88..1b7c70a4eed 100644 --- a/src/gateway/openresponses-phase.test.ts +++ b/src/gateway/openresponses-phase.test.ts @@ -58,10 +58,11 @@ describe("openresponses phase support", () => { phase: "commentary", status: "completed", }), - ).toMatchObject({ + ).toEqual({ type: "message", id: "msg_commentary", role: "assistant", + content: [{ type: "output_text", text: "Checking logs." }], phase: "commentary", status: "completed", }); @@ -73,10 +74,11 @@ describe("openresponses phase support", () => { phase: "final_answer", status: "completed", }), - ).toMatchObject({ + ).toEqual({ type: "message", id: "msg_final", role: "assistant", + content: [{ type: "output_text", text: "Root cause found." }], phase: "final_answer", status: "completed", });