diff --git a/.github/scripts/tests/feature-map.test.mjs b/.github/scripts/tests/feature-map.test.mjs index 3194903f701..f4b505fd324 100644 --- a/.github/scripts/tests/feature-map.test.mjs +++ b/.github/scripts/tests/feature-map.test.mjs @@ -81,7 +81,7 @@ test("deleted or renamed test references fail even inside runnable commands", (t test("broken documentation links fail, external URLs and local anchors are accepted", (t) => { const f = fixture(t); - f.write("feature-map/example.md", recipe + "\n[External](https://example.com) [Here](#gotchas) [Missing](../doc/missing.md#section)\n"); + f.write("feature-map/example.md", recipe + "\n[External](https://example.com/tests/external.test.ts) [Here](#gotchas) [Missing](../doc/missing.md#section)\n"); assert.deepEqual(f.check(), ["example.md: broken local link ../doc/missing.md#section"]); }); diff --git a/scripts/check-feature-map.mjs b/scripts/check-feature-map.mjs index 0c2bc791039..1bf3c516295 100644 --- a/scripts/check-feature-map.mjs +++ b/scripts/check-feature-map.mjs @@ -72,7 +72,8 @@ export function checkFeatureMap(repoRoot = defaultRoot) { } // Also validate test paths in runnable code blocks or backticked references. // This deliberately checks filenames, not test titles or behavioral coverage. - const testRefs = [...raw.matchAll(/(? match[1]); for (const path of new Set(testRefs)) { if (!localFile(repoRoot, path)) errors.push(`${file}: missing test ${path}`);