diff options
author | EuAndreh <eu@euandre.org> | 2024-03-17 17:10:24 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2024-03-17 17:10:24 -0300 |
commit | 4ecf01606fc9569d3934fffcfd3f669b488a2dd9 (patch) | |
tree | 2eaaafe902223f16e1176340f09f609e68b595d7 /tests | |
parent | src/hero.mjs: Use name of CWD as the default name of buildServer() (diff) | |
download | papod-4ecf01606fc9569d3934fffcfd3f669b488a2dd9.tar.gz papod-4ecf01606fc9569d3934fffcfd3f669b488a2dd9.tar.xz |
tests/js/hero.mjs: Add simple test for now()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/js/hero.mjs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/js/hero.mjs b/tests/js/hero.mjs index 1d5f910..7c19b8d 100644 --- a/tests/js/hero.mjs +++ b/tests/js/hero.mjs @@ -11,6 +11,7 @@ import { loggerGlobals, configLogger, logit, + now, makeLogger, isValidMethod, isValidUpgrade, @@ -80,6 +81,15 @@ const test_configLogger = async t => { }); }; +const test_now = async t => { + t.start("now()"); + + await t.test("we get an ISO date", () => { + const s = now(); + assert.deepEqual(s, new Date(s).toISOString()); + }); +}; + const test_logit = async t => { t.start("logit()"); @@ -2338,6 +2348,7 @@ const test_buildServer = async t => { await runner.runTests([ test_configLogger, test_logit, + test_now, test_makeLogger, test_isValidMethod, test_isValidUpgrade, |