projects
/
squeep-html-template-helper
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add indention helper
[squeep-html-template-helper]
/
test
/
lib
/
template-helper.js
diff --git
a/test/lib/template-helper.js
b/test/lib/template-helper.js
index c0cd94851343de6a757fd7912ed85b72b7a4a6c7..ab5533faca6695fa1328b94089b0b11f3a878501 100644
(file)
--- a/
test/lib/template-helper.js
+++ b/
test/lib/template-helper.js
@@
-56,6
+56,11
@@
describe('Template Helper', function () {
const result = th.dateFormat(undefined, undefined, undefined, expected);
assert.strictEqual(result, expected);
});
const result = th.dateFormat(undefined, undefined, undefined, expected);
assert.strictEqual(result, expected);
});
+ it('handles invalid date', function () {
+ const expected = 'otherwise';
+ const result = th.dateFormat(new Date('bad date'), undefined, undefined, expected);
+ assert.strictEqual(result, expected);
+ });
it('renders Infinity', function () {
const expected = 'end of time';
const result = th.dateFormat(Infinity, expected);
it('renders Infinity', function () {
const expected = 'end of time';
const result = th.dateFormat(Infinity, expected);
@@
-166,6
+171,13
@@
describe('Template Helper', function () {
});
}); // LI
});
}); // LI
+ describe('indented', function () {
+ it('covers', function () {
+ const result = th.indented(2, ['foo', 'bar']);
+ result.forEach((r) => assert(r.startsWith('\t\t')));
+ });
+ }); // indented
+
describe('htmlBody', function () {
it('covers no main', function () {
const result = th.htmlBody(pagePathLevel, ctx, options);
describe('htmlBody', function () {
it('covers no main', function () {
const result = th.htmlBody(pagePathLevel, ctx, options);