mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-16 11:30:43 +00:00
test: clarify live loose boolean assertions
This commit is contained in:
@@ -130,7 +130,8 @@ describeLive("xai live", () => {
|
||||
: [];
|
||||
expect(payloadTools.length).toBeGreaterThan(0);
|
||||
const firstFunction = payloadTools[0]?.function;
|
||||
expect(firstFunction && typeof firstFunction === "object").toBe(true);
|
||||
expect(firstFunction).not.toBeNull();
|
||||
expect(typeof firstFunction).toBe("object");
|
||||
expect([undefined, false]).toContain((firstFunction as Record<string, unknown>).strict);
|
||||
});
|
||||
}, 90_000);
|
||||
|
||||
@@ -238,7 +238,7 @@ const COMMAND_PROFILES: Record<string, CommandProfile> = {
|
||||
outcome: "success",
|
||||
onSuccess: (payload) => {
|
||||
const obj = assertObjectPayload("sms.search", payload);
|
||||
expect(typeof obj.count === "number" || typeof obj.count === "string").toBe(true);
|
||||
expect(["number", "string"]).toContain(typeof obj.count);
|
||||
expect(Array.isArray(obj.messages)).toBe(true);
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user