4 const assert
= require('assert');
5 const template
= require('../../../src/template/authorization-error-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');
11 const stubLogger
= new StubLogger();
12 const htmlValidate
= new HtmlValidate();
13 const lintHtml
= makeHtmlLint(stubLogger
, htmlValidate
);
15 describe('Authorization Error HTML Template', function () {
17 beforeEach(function () {
19 config
= new Config('test');
21 it('renders', async
function () {
22 const result
= template(ctx
, config
);
23 await
lintHtml(result
);
26 it('renders errors', async
function () {
29 errorDescriptions: ['something went wrong', 'another thing went wrong'],
31 const result
= template(ctx
, config
);
32 await
lintHtml(result
);
35 }); // Authorization Error HTML Template