Fix unit tests (no doctests yet)

This commit is contained in:
Pieter Vander Vennet 2023-02-09 00:10:59 +01:00
parent 325b8831f2
commit 7cc184fdd8
9 changed files with 154 additions and 81 deletions

View file

@ -15,7 +15,11 @@ export class ExtractImages extends Conversion<
private static readonly layoutMetaPaths = metapaths.filter(
(mp) =>
ExtractImages.mightBeTagRendering(<any>mp) ||
(mp.typeHint !== undefined && (mp.typeHint === "image" || mp.typeHint === "icon"))
(mp.typeHint !== undefined &&
(mp.typeHint === "image" ||
mp.typeHint === "icon" ||
mp.typeHint === "image[]" ||
mp.typeHint === "icon[]"))
)
private static readonly tagRenderingMetaPaths = tagrenderingmetapaths
@ -172,7 +176,13 @@ export class ExtractImages extends Conversion<
)
continue
}
allFoundImages.push(foundElement.leaf)
if (typeof foundElement.leaf !== "string") {
continue
}
allFoundImages.push({
context: context + "." + foundElement.path.join("."),
path: foundElement.leaf,
})
}
}
}