minor refactors
[squeep-html-template-helper] / test / lib / template-helper.js
index 75481adfee0b010330cc89a39656fd7f28e862ef..c62a3c01161be58bbc283c057bf75240312f941f 100644 (file)
@@ -170,6 +170,17 @@ describe('Template Helper', function () {
     });
   }); // renderNavLink
 
+  describe('elementAttributes', function () {
+    it('covers', function () {
+      const attributes = {
+        class: 'foo bar',
+        disabled: '',
+      };
+      const result = th.elementAttributes(attributes);
+      assert.strictEqual(result, ' class="foo bar" disabled');
+    });
+  }); // elementAttributes
+
   describe('OL', function () {
     it('covers', function () {
       const result = th.OL(['item', 'another item'], 1, { class: 'class' }, (item) => ({ class: `${item}-class` }));
@@ -273,6 +284,7 @@ describe('Template Helper', function () {
       ];
     });
     it('covers', async function () {
+      this.slow(1000); // First invocation of htmlLint takes some time.
       const result = th.htmlPage(pagePathLevel, ctx, options, main);
       await htmlLint(result);
       assert(result);