Fix tests

This commit is contained in:
pietervdvn 2022-02-20 00:44:38 +01:00
parent 6a76865312
commit 89c5cd3565

View file

@ -466,8 +466,9 @@ export default class LegacyThemeLoaderSpec extends T {
} }
}] }]
}, "test"); }, "test");
T.isTrue(r.warnings.length > 0, "No images found"); const errors = r.errors;
T.isTrue(r.warnings.some(msg => msg.indexOf("./assets/layers/bike_parking/staple.svg") >= 0), "staple.svg not mentioned"); T.isTrue(errors.length > 0, "No images found");
T.isTrue(errors.some(msg => msg.indexOf("./assets/layers/bike_parking/staple.svg") >= 0), "staple.svg not mentioned");
}], }],
["Images in 'thens' icons are detected", () => { ["Images in 'thens' icons are detected", () => {
const r = new ExtractImages(true, new Map<string, any>()).convert(<any>{ const r = new ExtractImages(true, new Map<string, any>()).convert(<any>{