Fix tests

This commit is contained in:
Pieter Vander Vennet 2022-02-19 02:45:15 +01:00
parent d9d6e96fed
commit 04a2cc9bc7
18 changed files with 71 additions and 72 deletions

View file

@ -10,7 +10,7 @@ export default class ImageAttributionSpec extends T {
[
"Should find all the images",
() => {
const images = new Set(new ExtractImages(true).convertStrict(<any> cyclofix, "test"))
const images = new Set(new ExtractImages(true, new Map<string, any>()).convertStrict(<any> cyclofix, "test"))
const expectedValues = [
'./assets/layers/bike_repair_station/repair_station.svg',
'./assets/layers/bike_repair_station/repair_station_pump.svg',

View file

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

View file

@ -59,7 +59,7 @@ async function main() {
let args = [...process.argv]
args.splice(0, 2)
args = args.map(a => a.toLowerCase())
args = args.map(a => a.toLowerCase().replace(/"/g, ""))
const allFailures: { testsuite: string, name: string, msg: string } [] = []
let testsToRun = allTests
@ -72,6 +72,7 @@ async function main() {
}
})
testsToRun = allTests.filter(t => args.indexOf(t.name.toLowerCase()) >= 0)
console.log("Only running test "+testsToRun.join(", "))
}
if (testsToRun.length == 0) {