Fix tests

This commit is contained in:
pietervdvn 2022-02-20 02:02:09 +01:00
parent 125b63927d
commit 30f4be183e
2 changed files with 4 additions and 4 deletions

View file

@ -264,7 +264,7 @@ export class DetectShadowedMappings extends DesugaringStep<TagRenderingConfigJso
continue continue
} }
const keyValues = parsedConditions[i].asChange({}); const keyValues = parsedConditions[i].asChange({});
const properties = [] const properties = {}
keyValues.forEach(({k, v}) => { keyValues.forEach(({k, v}) => {
properties[k] = v properties[k] = v
}) })

View file

@ -422,8 +422,8 @@ export default class LegacyThemeLoaderSpec extends T {
} }
] ]
}, "test"); }, "test");
T.isTrue(r.errors.length > 0, "Failing case 0 is not detected") T.isTrue(r.warnings.length > 0, "Failing case 0 is not detected")
T.isTrue(r.warnings[0].indexOf("The mapping key=value is fully matched by a previous mapping (namely 0)") >= 0, "Error message does not contain tag and indices")
const r0 = new DetectShadowedMappings().convert({ const r0 = new DetectShadowedMappings().convert({
mappings: [ mappings: [
{ {
@ -436,7 +436,7 @@ export default class LegacyThemeLoaderSpec extends T {
} }
] ]
}, "test"); }, "test");
T.isTrue(r0.errors.length > 0, "Failing case 1 is not detected") T.isTrue(r0.warnings.length > 0, "Failing case 1 is not detected")
} }
], ],
["Images are rewritten", () => { ["Images are rewritten", () => {