diff --git a/src/logging/diagnostic-stability-bundle.test.ts b/src/logging/diagnostic-stability-bundle.test.ts index 60e6aebc99f..fa02e257ef8 100644 --- a/src/logging/diagnostic-stability-bundle.test.ts +++ b/src/logging/diagnostic-stability-bundle.test.ts @@ -107,25 +107,15 @@ describe("diagnostic stability bundles", () => { const bundle = readBundle(file); const raw = fs.readFileSync(file, "utf8"); - expect(bundle).toMatchObject({ - version: 1, - generatedAt: "2026-04-22T12:00:00.000Z", - reason: "gateway.restart_startup_failed", - error: { - name: "Error", - code: "ERR_TEST", - }, - host: { - hostname: "", - }, - snapshot: { - count: 2, - }, - }); - expect(bundle.snapshot.events[0]).toMatchObject({ - type: "webhook.error", - channel: "telegram", - }); + expect(bundle.version).toBe(1); + expect(bundle.generatedAt).toBe("2026-04-22T12:00:00.000Z"); + expect(bundle.reason).toBe("gateway.restart_startup_failed"); + expect(bundle.error?.name).toBe("Error"); + expect(bundle.error?.code).toBe("ERR_TEST"); + expect(bundle.host.hostname).toBe(""); + expect(bundle.snapshot.count).toBe(2); + expect(bundle.snapshot.events[0]?.type).toBe("webhook.error"); + expect(bundle.snapshot.events[0]?.channel).toBe("telegram"); expect(bundle.snapshot.events[0]).not.toHaveProperty("chatId"); expect(bundle.snapshot.events[0]).not.toHaveProperty("error"); expect(bundle.error?.message).toContain("google/web-search-contract-api.js"); @@ -161,18 +151,14 @@ describe("diagnostic stability bundles", () => { } const bundle = readBundle(result.path); const raw = fs.readFileSync(result.path, "utf8"); - expect(bundle).toMatchObject({ - reason: "gateway.restart_startup_failed", - error: { - name: "Error", - code: "ERR_CONFIG_PARSE", - message: "raw startup config payload", - }, - snapshot: { - count: 0, - events: [], - }, + expect(bundle.reason).toBe("gateway.restart_startup_failed"); + expect(bundle.error).toEqual({ + name: "Error", + code: "ERR_CONFIG_PARSE", + message: "raw startup config payload", }); + expect(bundle.snapshot.count).toBe(0); + expect(bundle.snapshot.events).toEqual([]); expect(raw).not.toContain("stack"); });