X-Git-Url: http://git.squeep.com/?p=squeep-html-template-helper;a=blobdiff_plain;f=test%2Flib%2Ftemplate-helper.js;h=fa3f86a33a7517bbdee59626cc6de2f92218ac55;hp=ab5533faca6695fa1328b94089b0b11f3a878501;hb=826ef55e1f8506012d627294c8225cf8b01a5a69;hpb=f37d9d799c5d5c1b044907b9f4950920676401ed
diff --git a/test/lib/template-helper.js b/test/lib/template-helper.js
index ab5533f..fa3f86a 100644
--- a/test/lib/template-helper.js
+++ b/test/lib/template-helper.js
@@ -83,6 +83,26 @@ describe('Template Helper', function () {
});
}); // dateFormat
+ describe('timeElement', function () {
+ it('renders a date', function () {
+ const when = new Date('2022-09-11T21:17:56.872Z');
+ const expected = '';
+ const result = th.timeElement(when);
+ assert.strictEqual(result, expected);
+ });
+ it('covers title', function () {
+ const when = new Date('2022-09-11T21:17:56.872Z');
+ const expected = '';
+ const result = th.timeElement(when, { title: 'a date' });
+ assert.strictEqual(result, expected);
+ });
+ it('covers other', function () {
+ const expected = '';
+ const result = th.timeElement(1648420085049);
+ assert.strictEqual(result, expected);
+ });
+ }); // timeElement
+
describe('secondsToPeriod', function () {
it('covers seconds', function () {
const result = th.secondsToPeriod(45);