projects
/
squeep-html-template-helper
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rework html linting
[squeep-html-template-helper]
/
test
/
lib
/
template-helper.js
diff --git
a/test/lib/template-helper.js
b/test/lib/template-helper.js
index 968a85f75c2f9e9651252099fefbc5eb96dc026d..ec7ab5da605315edb2cee3647c938b696944c8f7 100644
(file)
--- a/
test/lib/template-helper.js
+++ b/
test/lib/template-helper.js
@@
-4,9
+4,11
@@
const assert = require('assert');
const th = require('../../lib/template-helper');
const stubLogger = require('../stub-logger');
const assert = require('assert');
const th = require('../../lib/template-helper');
const stubLogger = require('../stub-logger');
-const LintHtml = require('../lint-html');
-const lintHtml = new LintHtml(stubLogger);
+const { makeHtmlLint } = require('../lint-html');
+const { HtmlValidate } = require('html-validate');
+const htmlValidate = new HtmlValidate();
+const htmlLint = makeHtmlLint(stubLogger, htmlValidate);
describe('Template Helper', function () {
let ctx, options, pagePathLevel;
describe('Template Helper', function () {
let ctx, options, pagePathLevel;
@@
-266,12
+268,12
@@
describe('Template Helper', function () {
});
it('covers', async function () {
const result = th.htmlPage(pagePathLevel, ctx, options, main);
});
it('covers', async function () {
const result = th.htmlPage(pagePathLevel, ctx, options, main);
- await
lintHtml.l
int(result);
+ await
htmlL
int(result);
assert(result);
});
it('covers defaults', async function () {
const result = th.htmlPage(pagePathLevel, ctx, options, main);
assert(result);
});
it('covers defaults', async function () {
const result = th.htmlPage(pagePathLevel, ctx, options, main);
- await
lintHtml.l
int(result);
+ await
htmlL
int(result);
assert(result);
});
it('covers user', async function () {
assert(result);
});
it('covers user', async function () {
@@
-279,7
+281,7
@@
describe('Template Helper', function () {
authenticatedProfile: 'https://user.example.com/',
};
const result = th.htmlPage(pagePathLevel, ctx, options, main);
authenticatedProfile: 'https://user.example.com/',
};
const result = th.htmlPage(pagePathLevel, ctx, options, main);
- await
lintHtml.l
int(result);
+ await
htmlL
int(result);
assert(result);
});
it('covers user at root path', async function () {
assert(result);
});
it('covers user at root path', async function () {
@@
-288,7
+290,7
@@
describe('Template Helper', function () {
};
pagePathLevel = 0;
const result = th.htmlPage(pagePathLevel, ctx, options, main);
};
pagePathLevel = 0;
const result = th.htmlPage(pagePathLevel, ctx, options, main);
- await
lintHtml.l
int(result);
+ await
htmlL
int(result);
assert(result);
});
it('covers logout redirect', async function () {
assert(result);
});
it('covers logout redirect', async function () {
@@
-297,7
+299,7
@@
describe('Template Helper', function () {
};
ctx.url = 'https://app.example.com/this_page';
const result = th.htmlPage(pagePathLevel, ctx, options, main);
};
ctx.url = 'https://app.example.com/this_page';
const result = th.htmlPage(pagePathLevel, ctx, options, main);
- await
lintHtml.l
int(result);
+ await
htmlL
int(result);
assert(result);
});
it('covers existing navLinks', async function () {
assert(result);
});
it('covers existing navLinks', async function () {
@@
-309,7
+311,7
@@
describe('Template Helper', function () {
href: 'link',
}];
const result = th.htmlPage(pagePathLevel, ctx, options);
href: 'link',
}];
const result = th.htmlPage(pagePathLevel, ctx, options);
- await
lintHtml.l
int(result);
+ await
htmlL
int(result);
assert(result);
});
}); // htmlPage
assert(result);
});
}); // htmlPage