test(whichkey): fix key-sequence generator wrapping at 26 in tests

makeMatches() wrapped at charCode 97+26, producing duplicate keys past
the alphabet instead of distinct ones.
This commit is contained in:
Robert Hill 2026-08-27 11:46:01 -04:00
parent 9d5d8e6087
commit b3bc31875b

View file

@ -35,7 +35,7 @@ function makeKey(
function makeMatches(count: number): Map<keyseq.MinimalKey[], string> {
const map: Map<keyseq.MinimalKey[], string> = new Map()
for (let i = 0; i < count; i++) {
map.set([makeKey(String.fromCharCode(97 + (i % 26)))], `cmd${i}`)
map.set([makeKey(String.fromCharCode(97 + i))], `cmd${i}`)
}
return map
}