mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-21 16:41:56 +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
|
||||
expect(result.outputs).toHaveLength(0);
|
||||
expect(result.decision.outcome).toBe("skipped");
|
||||
expect(result.decision.attachments[0]?.attempts[0]?.outcome).toBe("skipped");
|
||||
expect(result.decision.attachments[0]?.attempts[0]?.reason).toContain("tooSmall");
|
||||
expect(result.decision.attachments).toHaveLength(1);
|
||||
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 {
|
||||
process.env.PATH = originalPath;
|
||||
await cache.cleanup();
|
||||
|
||||
Reference in New Issue
Block a user