From 30f4be183ee232d4f941c0987b24dbf0d2dd3b71 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sun, 20 Feb 2022 02:02:09 +0100 Subject: [PATCH] Fix tests --- Models/ThemeConfig/Conversion/Validation.ts | 2 +- test/LegacyThemeLoader.spec.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Models/ThemeConfig/Conversion/Validation.ts b/Models/ThemeConfig/Conversion/Validation.ts index 5380360d36..f8174c5b0e 100644 --- a/Models/ThemeConfig/Conversion/Validation.ts +++ b/Models/ThemeConfig/Conversion/Validation.ts @@ -264,7 +264,7 @@ export class DetectShadowedMappings extends DesugaringStep { properties[k] = v }) diff --git a/test/LegacyThemeLoader.spec.ts b/test/LegacyThemeLoader.spec.ts index e3b66ff655..8b1972120d 100644 --- a/test/LegacyThemeLoader.spec.ts +++ b/test/LegacyThemeLoader.spec.ts @@ -422,8 +422,8 @@ export default class LegacyThemeLoaderSpec extends T { } ] }, "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({ mappings: [ { @@ -436,7 +436,7 @@ export default class LegacyThemeLoaderSpec extends T { } ] }, "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", () => {