Skip to content

Commit

Permalink
remove the test case
Browse files Browse the repository at this point in the history
  • Loading branch information
OnkarRuikar committed Jan 22, 2024
1 parent e641c7b commit bf7379b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 37 deletions.
10 changes: 7 additions & 3 deletions kumascript/macros/MDNSidebar.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -207,12 +207,12 @@ const sections = [
},
];
const baseURL = `/${env.locale}/docs/MDN/`;
const sidebarURL = `/docs/MDN/`;
const baseURL = `/${env.locale}${sidebarURL}`;
async function getTitle(pageSlug) {
let page = await wiki.getPage(`${baseURL}${pageSlug}`);
if (!page.title) {
page = await wiki.getPage(`/en-US/${baseURL}${pageSlug}`);
page = await wiki.getPage(`/en-US${sidebarURL}${pageSlug}`);
}
return page.title;
}
Expand All @@ -236,6 +236,7 @@ async function renderSection(section) {
}
async function renderSidebar(macroName) {
try {
let output = '<section id="Quick_links" data-macro="MDNSidebar"><ol>';
for (const section of sections) {
if (section.subSections) {
Expand All @@ -246,6 +247,9 @@ async function renderSidebar(macroName) {
}
output += "</ol></section>";
return output;
} catch (e) {
console.warn("error");
}
}
const output = await renderSidebar();
Expand Down
34 changes: 0 additions & 34 deletions kumascript/tests/macros/mdnsidebar.test.ts

This file was deleted.

0 comments on commit bf7379b

Please sign in to comment.