mirror of
https://github.com/tridactyl/tridactyl.git
synced 2026-09-10 07:16:33 -04:00
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:
parent
9d5d8e6087
commit
b3bc31875b
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue