From a08f765fc7d1cf810c7a8315d6252c8d7edefe0d Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 10 May 2026 03:00:46 +0100 Subject: [PATCH] test: tighten diagnostics unparented lifecycle assertions --- .../diagnostics-otel/src/service.test.ts | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/extensions/diagnostics-otel/src/service.test.ts b/extensions/diagnostics-otel/src/service.test.ts index 24ae0eb6c8e2..67eb11a8260b 100644 --- a/extensions/diagnostics-otel/src/service.test.ts +++ b/extensions/diagnostics-otel/src/service.test.ts @@ -1959,10 +1959,8 @@ describe("diagnostics-otel service", () => { const parentBySpanName = Object.fromEntries( telemetryState.tracer.startSpan.mock.calls.map((call) => [call[0], call[2]]), ); - expect(parentBySpanName).toMatchObject({ - "openclaw.run": undefined, - "openclaw.model.call": undefined, - }); + expect(parentBySpanName["openclaw.run"]).toBeUndefined(); + expect(parentBySpanName["openclaw.model.call"]).toBeUndefined(); await service.stop?.(ctx); }); @@ -2003,10 +2001,8 @@ describe("diagnostics-otel service", () => { const parentBySpanName = Object.fromEntries( telemetryState.tracer.startSpan.mock.calls.map((call) => [call[0], call[2]]), ); - expect(parentBySpanName).toMatchObject({ - "openclaw.run": undefined, - "openclaw.model.call": undefined, - }); + expect(parentBySpanName["openclaw.run"]).toBeUndefined(); + expect(parentBySpanName["openclaw.model.call"]).toBeUndefined(); await service.stop?.(ctx); }); @@ -2061,11 +2057,9 @@ describe("diagnostics-otel service", () => { const parentBySpanName = Object.fromEntries( telemetryState.tracer.startSpan.mock.calls.map((call) => [call[0], call[2]]), ); - expect(parentBySpanName).toMatchObject({ - "openclaw.run": undefined, - "openclaw.model.call": undefined, - "openclaw.tool.execution": undefined, - }); + expect(parentBySpanName["openclaw.run"]).toBeUndefined(); + expect(parentBySpanName["openclaw.model.call"]).toBeUndefined(); + expect(parentBySpanName["openclaw.tool.execution"]).toBeUndefined(); await service.stop?.(ctx); });