Skip to content

Commit 541df95

Browse files
committed
tests - add file information in ensureHtmlElements logging
1 parent f92e675 commit 541df95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/verify.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,22 +282,22 @@ export const ensureHtmlElements = (
282282
noMatchSelectors?: string[],
283283
): Verify => {
284284
return {
285-
name: "Inspecting HTML for Selectors",
285+
name: `Inspecting HTML for Selectors in ${file}`,
286286
verify: async (_output: ExecuteOutput[]) => {
287287
const htmlInput = await Deno.readTextFile(file);
288288
const doc = new DOMParser().parseFromString(htmlInput, "text/html")!;
289289
selectors.forEach((sel) => {
290290
assert(
291291
doc.querySelector(sel) !== null,
292-
`Required DOM Element ${sel} is missing.`,
292+
`Required DOM Element ${sel} is missing in ${file}.`,
293293
);
294294
});
295295

296296
if (noMatchSelectors) {
297297
noMatchSelectors.forEach((sel) => {
298298
assert(
299299
doc.querySelector(sel) === null,
300-
`Illegal DOM Element ${sel} is present.`,
300+
`Illegal DOM Element ${sel} is present in ${file}.`,
301301
);
302302
});
303303
}

0 commit comments

Comments
 (0)