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:
A 2026-03-13 03:00:45 -07:00 committed by GitHub
parent f18fb7cfa9
commit 520e55bb75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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