Merge pull request #4719 from tridactyl/test_mapstrs

Test default config map strings
This commit is contained in:
Oliver Blanthorn 2023-06-01 18:03:20 +00:00 committed by GitHub
commit b751d64639
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

13
src/lib/config.test.ts Normal file
View file

@ -0,0 +1,13 @@
import { testAll, testAllObject } from "@src/lib/test_utils"
import { canonicaliseMapstr } from "@src/lib/keyseq"
import { default_config } from "@src/lib/config"
import { zip } from "ramda"
const config = new default_config()
// todo: test subconfigs and platform_defaults
const nmaps = Object.keys(config.nmaps)
for (let mode of Object.keys(config).filter(x=>x.match(/maps$/))) {
const mapstrings = Object.keys(config[mode])
testAll(canonicaliseMapstr, zip(mapstrings, mapstrings))
}

View file

@ -129,7 +129,7 @@ export class default_config {
"<C-[>": "ex.hide_and_clear",
"<ArrowUp>": "ex.prev_history",
"<ArrowDown>": "ex.next_history",
"<S-Del>": "ex.execute_ex_on_completion_args tabclose",
"<S-Delete>": "ex.execute_ex_on_completion_args tabclose",
"<A-b>": "text.backward_word",
"<A-f>": "text.forward_word",
@ -423,7 +423,7 @@ export class default_config {
browsermaps = {
"<C-,>": "escapehatch",
"<C-6>": "tab #",
"<CS-6>": "tab #",
// "<CS-6>": "tab #", // banned by e2e tests
}
/**