chore: automated housekeeping...

This commit is contained in:
Pieter Vander Vennet 2025-09-07 22:49:44 +02:00
parent ebc48f6b53
commit e7de94576f
232 changed files with 11430 additions and 3365 deletions

View file

@ -7,15 +7,20 @@ import { Tag } from "../../src/Logic/Tags/Tag"
describe("Integration_unit_has_space", () => {
it("maxspeed should produce '20 mph' and not '20mph'", () => {
const maxspeed = new LayerConfig(
<LayerConfigJson><any>maxspeed_layer, "integration_test"
)
const maxspeedQuestion = maxspeed.tagRenderings.find(tr => tr.id === "maxspeed-maxspeed")
const unit = maxspeed.units.find(unit => unit.appliesToKeys.has("maxspeed"))
const spec = maxspeedQuestion.constructChangeSpecification("20", undefined, undefined, {
"_country": "gb"
}, unit).find(t => t["key"] === "maxspeed")
const maxspeed = new LayerConfig(<LayerConfigJson>(<any>maxspeed_layer), "integration_test")
const maxspeedQuestion = maxspeed.tagRenderings.find((tr) => tr.id === "maxspeed-maxspeed")
const unit = maxspeed.units.find((unit) => unit.appliesToKeys.has("maxspeed"))
const spec = maxspeedQuestion
.constructChangeSpecification(
"20",
undefined,
undefined,
{
_country: "gb",
},
unit
)
.find((t) => t["key"] === "maxspeed")
expect(spec.asJson()).to.eq(new Tag("maxspeed", "20 mph").asJson())
})
})