minor cleanups, add logoAlt
[squeep-html-template-helper] / test / lib / template-helper.js
index ec7ab5da605315edb2cee3647c938b696944c8f7..75481adfee0b010330cc89a39656fd7f28e862ef 100644 (file)
@@ -16,9 +16,7 @@ describe('Template Helper', function () {
   beforeEach(function () {
     pagePathLevel = 2;
     ctx = {};
-    options = {
-      pageTitle: 'Test Page',
-    };
+    options = {};
   });
 
   describe('initContext', function () {
@@ -264,7 +262,15 @@ describe('Template Helper', function () {
   describe('htmlPage', function () {
     let main;
     beforeEach(function () {
-      main = [];
+      th.initContext(ctx);
+      ctx.errors.push('an error');
+      ctx.notifications.push('a notice');
+      options.headElements = ['<link rel="author" href="https://example.com/">'];
+      options.pageTitle = 'Test Page';
+      main = [
+        th.UL(['an item', 'another item']),
+        th.timeElement(new Date(), { title: 'now' }),
+      ];
     });
     it('covers', async function () {
       const result = th.htmlPage(pagePathLevel, ctx, options, main);