mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 20:09:34 +00:00
test: update assertions to match improved error messages (#1109)
The error messages were previously improved to be more user-friendly and actionable (see PR #1103), but some tests were still checking for the old error text. This commit updates test assertions to match the new, clearer error messages. Changes: - Update security.test.ts assertions to check for new error message patterns - Fix case-sensitivity issue in cli-version-and-dispatch.test.ts - Update index-main-routing.test.ts to match new validation messages The improved error messages now: - Tell users WHAT went wrong - Tell users HOW to fix it - Provide concrete examples and next steps Agent: ux-engineer Co-authored-by: Spawn Refactor Service <refactor@spawn.service> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
0d494d044e
commit
cce815836f
3 changed files with 35 additions and 35 deletions
|
|
@ -409,7 +409,7 @@ describe("extra arguments warning", () => {
|
|||
it("should warn about extra args after version command", () => {
|
||||
const { stderr, stdout, exitCode } = runCLI(["version", "extra"]);
|
||||
expect(exitCode).toBe(0);
|
||||
expect(stderr).toContain("extra argument");
|
||||
expect(stderr.toLowerCase()).toContain("extra argument");
|
||||
expect(stderr).toContain("ignored");
|
||||
// Should still show version
|
||||
expect(stdout).toMatch(/spawn v\d+\.\d+/);
|
||||
|
|
@ -418,13 +418,13 @@ describe("extra arguments warning", () => {
|
|||
it("should warn about multiple extra args", () => {
|
||||
const { stderr, exitCode } = runCLI(["version", "a", "b", "c"]);
|
||||
expect(exitCode).toBe(0);
|
||||
expect(stderr).toContain("extra arguments");
|
||||
expect(stderr.toLowerCase()).toContain("extra arguments");
|
||||
expect(stderr).toContain("ignored");
|
||||
});
|
||||
|
||||
it("should not warn when no extra args", () => {
|
||||
const { stderr } = runCLI(["version"]);
|
||||
expect(stderr).not.toContain("extra argument");
|
||||
expect(stderr.toLowerCase()).not.toContain("extra argument");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue