mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-17 11:40:46 +00:00
test: tighten bash tool assertions
This commit is contained in:
@@ -418,9 +418,7 @@ describeNonWin("exec script preflight", () => {
|
||||
const text = result.content.find((c) => c.type === "text")?.text ?? "";
|
||||
|
||||
expect(text).not.toMatch(/exec preflight:/);
|
||||
expect(result.details).toMatchObject({
|
||||
status: expect.stringMatching(/completed|failed/),
|
||||
});
|
||||
expect((result.details as { status?: string }).status).toMatch(/completed|failed/);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -436,7 +434,7 @@ describeNonWin("exec script preflight", () => {
|
||||
});
|
||||
const text = result.content.find((c) => c.type === "text")?.text?.trim();
|
||||
|
||||
expect(result.details).toMatchObject({ status: "completed" });
|
||||
expect((result.details as { status?: string }).status).toBe("completed");
|
||||
expect(text).toBe("ok");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user