Skip to content

Commit cd8058b

Browse files
committed
cleanup
1 parent 2172e10 commit cd8058b

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

tests/run-in-depth.mjs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ async function setUp() {
9090
return { document, definedBenchmarks, inDepthBenchmarks };
9191
}
9292

93-
function checkHasAnyBenchmarks({ definedBenchmarks}) {
93+
function checkHasAnyBenchmarks({ definedBenchmarks }) {
9494
if (definedBenchmarks.length == 0) {
9595
throw new Error("No benchmarks defined");
9696
}
@@ -128,14 +128,10 @@ async function checkRelativeLinks({ document }) {
128128
const links = dd.querySelectorAll("a[href]");
129129
links.forEach((link) => {
130130
const href = link.getAttribute("href");
131-
if (href.startsWith("http") || href.startsWith("mailto:") || href.startsWith("#")) {
131+
if (href.startsWith("http")) {
132132
return;
133133
}
134-
135-
// Handle anchors in file paths (e.g. "foo.html#bar") and query params
136-
const relativePath = href.split("#")[0].split("?")[0];
137-
const filePath = path.join(rootDir, relativePath);
138-
134+
const filePath = path.join(rootDir, href);
139135
if (!fs.existsSync(filePath)) {
140136
errors.push(
141137
`Broken link in in-depth.html: '${href}' (resolved to '${filePath}') does not exist.`

0 commit comments

Comments
 (0)