mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 19:30:44 +00:00
test: tighten timeout signature assertions
This commit is contained in:
@@ -48,7 +48,8 @@ describe("exec foreground failures", () => {
|
||||
exitCode: null,
|
||||
aggregated: "",
|
||||
});
|
||||
expect((result.details as { durationMs?: number }).durationMs).toEqual(expect.any(Number));
|
||||
expect((result.details as { durationMs?: number }).durationMs).toBeTypeOf("number");
|
||||
expect((result.details as { durationMs?: number }).durationMs).toBeGreaterThanOrEqual(0);
|
||||
});
|
||||
|
||||
it("rejects invalid host values before launching a command", async () => {
|
||||
|
||||
@@ -211,7 +211,8 @@ describe("bootstrap prompt warnings", () => {
|
||||
mode: "once",
|
||||
});
|
||||
expect(first.warningShown).toBe(true);
|
||||
expect(first.signature).toEqual(expect.any(String));
|
||||
expect(first.signature).toBeTypeOf("string");
|
||||
expect(first.signature).not.toBe("");
|
||||
expect(JSON.parse(first.signature ?? "{}")).toMatchObject({
|
||||
bootstrapMaxChars: 120,
|
||||
bootstrapTotalMaxChars: 200,
|
||||
|
||||
@@ -589,7 +589,8 @@ describe("push APNs send semantics", () => {
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(sent?.signature).toEqual(expect.any(String));
|
||||
expect(sent?.signature).toBeTypeOf("string");
|
||||
expect(sent?.signature).not.toBe("");
|
||||
expect(result).toMatchObject({
|
||||
ok: true,
|
||||
status: 202,
|
||||
|
||||
Reference in New Issue
Block a user