fix typo in ticket template causing extraneous navLink to be displayed
[squeep-indie-auther] / test / src / template / root-html.js
1 /* eslint-env mocha */
2 'use strict';
3
4 const assert = require('assert');
5 const template = require('../../../src/template/root-html');
6 const Config = require('../../../config');
7 const StubLogger = require('../../stub-logger');
8 const { makeHtmlLint } = require('@squeep/html-template-helper');
9 const { HtmlValidate } = require('html-validate');
10
11 const stubLogger = new StubLogger();
12 const htmlValidate = new HtmlValidate();
13 const lintHtml = makeHtmlLint(stubLogger, htmlValidate);
14
15 describe('Root HTML Template', function () {
16 let ctx, config;
17 beforeEach(function () {
18 ctx = {};
19 config = new Config('test');
20 });
21 it('renders', async function () {
22 const result = template(ctx, config);
23 await lintHtml(result);
24 assert(result);
25 });
26 it('covers options', async function () {
27 config.adminContactHTML = '<div>support</div>';
28 const result = template(ctx, config);
29 await lintHtml(result);
30 assert(result);
31 });
32 }); // Root HTML Template