3 const assert
= require('assert');
4 const template
= require('../../../src/template/authorization-error-html');
5 const Config
= require('../../../config');
6 const StubLogger
= require('../../stub-logger');
7 const { makeHtmlLint
} = require('@squeep/html-template-helper');
8 const { HtmlValidate
} = require('html-validate');
10 const stubLogger
= new StubLogger();
11 const htmlValidate
= new HtmlValidate();
12 const lintHtml
= makeHtmlLint(stubLogger
, htmlValidate
);
14 describe('Authorization Error HTML Template', function () {
16 beforeEach(function () {
18 config
= new Config('test');
20 it('renders', async
function () {
21 const result
= template(ctx
, config
);
22 await
lintHtml(result
);
25 it('renders errors', async
function () {
28 errorDescriptions: ['something went wrong', 'another thing went wrong'],
30 const result
= template(ctx
, config
);
31 await
lintHtml(result
);
34 }); // Authorization Error HTML Template