projects
/
squeep-indie-auther
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update dependencies and devDependencies, address lint issues
[squeep-indie-auther]
/
test
/
src
/
template
/
authorization-error-html.js
diff --git
a/test/src/template/authorization-error-html.js
b/test/src/template/authorization-error-html.js
index ba92f30ed67c8367f35bee185dc9fbc3bda42a89..2d1567f1767bf1dbb86819146a1b284937a157fc 100644
(file)
--- a/
test/src/template/authorization-error-html.js
+++ b/
test/src/template/authorization-error-html.js
@@
-5,15
+5,12
@@
const assert = require('assert');
const template = require('../../../src/template/authorization-error-html');
const Config = require('../../../config');
const StubLogger = require('../../stub-logger');
const template = require('../../../src/template/authorization-error-html');
const Config = require('../../../config');
const StubLogger = require('../../stub-logger');
-const lint = require('html-minifier-lint').lint; // eslint-disable-line node/no-unpublished-require
+const { makeHtmlLint } = require('@squeep/html-template-helper');
+const { HtmlValidate } = require('html-validate');
const stubLogger = new StubLogger();
const stubLogger = new StubLogger();
-
-function lintHtml(html) {
- const result = lint(html);
- stubLogger.debug('validHtml', '', { result, html });
- assert(!result);
-}
+const htmlValidate = new HtmlValidate();
+const lintHtml = makeHtmlLint(stubLogger, htmlValidate);
describe('Authorization Error HTML Template', function () {
let ctx, config;
describe('Authorization Error HTML Template', function () {
let ctx, config;
@@
-21,18
+18,18
@@
describe('Authorization Error HTML Template', function () {
ctx = {};
config = new Config('test');
});
ctx = {};
config = new Config('test');
});
- it('renders', function () {
+ it('renders',
async
function () {
const result = template(ctx, config);
const result = template(ctx, config);
- lintHtml(result);
+
await
lintHtml(result);
assert(result);
});
assert(result);
});
- it('renders errors', function () {
+ it('renders errors',
async
function () {
ctx.session = {
error: 'error_name',
errorDescriptions: ['something went wrong', 'another thing went wrong'],
ctx.session = {
error: 'error_name',
errorDescriptions: ['something went wrong', 'another thing went wrong'],
- }
+ }
;
const result = template(ctx, config);
const result = template(ctx, config);
- lintHtml(result);
+
await
lintHtml(result);
assert(result);
});
}); // Authorization Error HTML Template
assert(result);
});
}); // Authorization Error HTML Template