X-Git-Url: http://git.squeep.com/?p=squeep-html-template-helper;a=blobdiff_plain;f=test%2Flib%2Ftemplate-helper.js;fp=test%2Flib%2Ftemplate-helper.js;h=75481adfee0b010330cc89a39656fd7f28e862ef;hp=ec7ab5da605315edb2cee3647c938b696944c8f7;hb=77f0fd50c8de53072f73052a01f69c6c6fc783f8;hpb=e3c393609f1b2380cb5c2c6f3910fc69186420d2
diff --git a/test/lib/template-helper.js b/test/lib/template-helper.js
index ec7ab5d..75481ad 100644
--- a/test/lib/template-helper.js
+++ b/test/lib/template-helper.js
@@ -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 = [''];
+ 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);