test: tighten bash tool assertions

This commit is contained in:
Peter Steinberger
2026-05-09 14:58:21 +01:00
parent 8eaca55cbb
commit b21414e49e
3 changed files with 23 additions and 16 deletions

View File

@@ -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");
});