test: tighten timeout signature assertions · openclaw/openclaw@cd89496
steipete
·
2026-05-08
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -48,7 +48,8 @@ describe("exec foreground failures", () => {
|
48 | 48 | exitCode: null, |
49 | 49 | aggregated: "", |
50 | 50 | }); |
51 | | -expect((result.details as { durationMs?: number }).durationMs).toEqual(expect.any(Number)); |
| 51 | +expect((result.details as { durationMs?: number }).durationMs).toBeTypeOf("number"); |
| 52 | +expect((result.details as { durationMs?: number }).durationMs).toBeGreaterThanOrEqual(0); |
52 | 53 | }); |
53 | 54 | |
54 | 55 | it("rejects invalid host values before launching a command", async () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -211,7 +211,8 @@ describe("bootstrap prompt warnings", () => {
|
211 | 211 | mode: "once", |
212 | 212 | }); |
213 | 213 | expect(first.warningShown).toBe(true); |
214 | | -expect(first.signature).toEqual(expect.any(String)); |
| 214 | +expect(first.signature).toBeTypeOf("string"); |
| 215 | +expect(first.signature).not.toBe(""); |
215 | 216 | expect(JSON.parse(first.signature ?? "{}")).toMatchObject({ |
216 | 217 | bootstrapMaxChars: 120, |
217 | 218 | bootstrapTotalMaxChars: 200, |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -589,7 +589,8 @@ describe("push APNs send semantics", () => {
|
589 | 589 | }, |
590 | 590 | }, |
591 | 591 | }); |
592 | | -expect(sent?.signature).toEqual(expect.any(String)); |
| 592 | +expect(sent?.signature).toBeTypeOf("string"); |
| 593 | +expect(sent?.signature).not.toBe(""); |
593 | 594 | expect(result).toMatchObject({ |
594 | 595 | ok: true, |
595 | 596 | status: 202, |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。