};
+/**
+ * Return array of strings prefixed with tabs.
+ * @param {Number} indent
+ * @param {String[]} list
+ */
+const indented = (indent, list) => {
+ const spacer = '\t'.repeat(indent);
+ return list.map((l) => `${spacer}${l}`);
+};
+
+
/**
* Render the preamble <head> for an HTML page.
* @param {Number} pagePathLevel number of paths below root this page is
htmlHeader,
htmlFooter,
htmlMessages,
+ indented,
renderNavLink,
LI,
UL,
});
}); // LI
+ describe('indented', function () {
+ it('covers', function () {
+ const result = th.indented(2, ['foo', 'bar']);
+ result.forEach((r) => assert(r.startsWith('\t\t')));
+ });
+ }); // indented
+
describe('htmlBody', function () {
it('covers no main', function () {
const result = th.htmlBody(pagePathLevel, ctx, options);