Fix #1921 and #1922: check config mapstring order

This commit is contained in:
Oliver Blanthorn 2023-06-01 19:42:05 +02:00
parent e3b44a69a9
commit 465194258b
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

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))
}