beforeEach(function () {
pagePathLevel = 2;
ctx = {};
- options = {
- pageTitle: 'Test Page',
- };
+ options = {};
});
describe('initContext', 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);