mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-28 03:49:31 +00:00
test: fix duplicate test that used wrong input for distance-3 boundary case (#2574)
The "should match at exactly distance 3" test in findClosestMatch was using "clau" as input (distance 2 from "claude"), which was identical to the "should match at distance 2" test immediately below it. Fixed by using "cla" as input, which is genuinely distance 3 from "claude" (requires inserting u, d, e), correctly testing the threshold boundary. Co-authored-by: spawn-qa-bot <qa@openrouter.ai> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f18fb7cfa9
commit
520e55bb75
1 changed files with 2 additions and 2 deletions
|
|
@ -430,8 +430,8 @@ describe("findClosestMatch - threshold boundary tests", () => {
|
|||
];
|
||||
|
||||
it("should match at exactly distance 3", () => {
|
||||
// "clau" -> "claude" distance 2, within threshold
|
||||
const result = findClosestMatch("clau", candidates);
|
||||
// "cla" -> "claude" requires 3 insertions (u, d, e) = distance 3, at threshold boundary
|
||||
const result = findClosestMatch("cla", candidates);
|
||||
expect(result).toBe("claude");
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue