mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 21:14:31 +00:00
fix: strengthen test assertions - assert array lengths before indexing
This commit is contained in:
committed by
Peter Steinberger
parent
8b70ba6ab8
commit
43f94e3ab8
@@ -65,8 +65,10 @@ describe("runCapability skips tiny audio files", () => {
|
|||||||
// The result should indicate the attachment was skipped
|
// The result should indicate the attachment was skipped
|
||||||
expect(result.outputs).toHaveLength(0);
|
expect(result.outputs).toHaveLength(0);
|
||||||
expect(result.decision.outcome).toBe("skipped");
|
expect(result.decision.outcome).toBe("skipped");
|
||||||
expect(result.decision.attachments[0]?.attempts[0]?.outcome).toBe("skipped");
|
expect(result.decision.attachments).toHaveLength(1);
|
||||||
expect(result.decision.attachments[0]?.attempts[0]?.reason).toContain("tooSmall");
|
expect(result.decision.attachments[0].attempts).toHaveLength(1);
|
||||||
|
expect(result.decision.attachments[0].attempts[0].outcome).toBe("skipped");
|
||||||
|
expect(result.decision.attachments[0].attempts[0].reason).toContain("tooSmall");
|
||||||
} finally {
|
} finally {
|
||||||
process.env.PATH = originalPath;
|
process.env.PATH = originalPath;
|
||||||
await cache.cleanup();
|
await cache.cleanup();
|
||||||
|
|||||||
Reference in New Issue
Block a user