From 850a47e35ffd75e7462324a9005eec23b03a3a38 Mon Sep 17 00:00:00 2001 From: gtune98 <89553494+gtune98@users.noreply.github.com> Date: Thu, 26 Aug 2021 09:18:39 -0500 Subject: [PATCH] Update dateString.test.js Changed milliseconds to seconds. Added the example date as a test. --- src/dateString.test.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/dateString.test.js b/src/dateString.test.js index 6667558..a1cf840 100644 --- a/src/dateString.test.js +++ b/src/dateString.test.js @@ -4,10 +4,16 @@ import { dateString } from './index'; if (dateString()) { test('Nominal', t => { - const actual = 1485470818000; + const actual = 1485470818; const expected = 'January 26, 2017'; t.is(dateString(actual), expected, 'Values should be equal'); }); + + test('Example', t => { + const actual = 1499126400; + const expected = 'July 4, 2017'; + t.is(dateString(actual), expected, 'Values should be equal'); + }); test('No date given', t => { const expected = new moment().format('MMMM DD, YYYY'); @@ -24,4 +30,4 @@ if (dateString()) { test('function not defined - ignoring', t => { t.pass(); }); -} \ No newline at end of file +}