diff --git a/scripts/markdown-refs.test.mjs b/scripts/markdown-refs.test.mjs index 7ae5b2c12d..3d850a5f01 100644 --- a/scripts/markdown-refs.test.mjs +++ b/scripts/markdown-refs.test.mjs @@ -58,7 +58,7 @@ test("HTML comments hide references on one line or across several", () => { test("annotating leaves every other byte in place", async () => { const dir = new URL("../release-notes/studio/", import.meta.url); - for (const name of await readdir(dir)) { + for (const name of (await readdir(dir, { recursive: true })).filter((entry) => entry.endsWith(".md"))) { const source = await readFile(new URL(name, dir), "utf8"); assert.equal(annotateMarkdown(source, () => ""), source, name); assert.equal(annotateMarkdown(source, tag).replace(/<\d+>/g, ""), source, name); diff --git a/scripts/studio-release-notes.test.mjs b/scripts/studio-release-notes.test.mjs index e521bbec7b..6eabf95e87 100644 --- a/scripts/studio-release-notes.test.mjs +++ b/scripts/studio-release-notes.test.mjs @@ -62,7 +62,7 @@ test("an unresolved ref stays plain and is reported by code", async () => { test("committed notes render unchanged when nothing is credited", async () => { const dir = new URL("../release-notes/studio/", import.meta.url); - for (const name of await readdir(dir)) { + for (const name of (await readdir(dir, { recursive: true })).filter((entry) => entry.endsWith(".md"))) { const source = await readFile(new URL(name, dir), "utf8"); assert.equal(renderStudioNotes(source, new Map()), `${source.trimEnd()}\n`, name); }