From ae140c308d67ea010559f5e38e472de15dfb8124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Wed, 10 Jan 2018 16:31:49 +0100 Subject: [PATCH] add 2 tests, getDaysDiffBetweenDates, getType --- test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js | 1 + test/getType/getType.test.js | 1 + 2 files changed, 2 insertions(+) diff --git a/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js b/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js index 212843605..39633f863 100644 --- a/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js +++ b/test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js @@ -5,6 +5,7 @@ test('Testing getDaysDiffBetweenDates', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof getDaysDiffBetweenDates === 'function', 'getDaysDiffBetweenDates is a Function'); + t.equal(getDaysDiffBetweenDates(new Date('2017-12-13'), new Date('2017-12-22')), 9, "Returns the difference in days between two dates"); //t.deepEqual(getDaysDiffBetweenDates(args..), 'Expected'); //t.equal(getDaysDiffBetweenDates(args..), 'Expected'); //t.false(getDaysDiffBetweenDates(args..), 'Expected'); diff --git a/test/getType/getType.test.js b/test/getType/getType.test.js index 18d277ff7..2ae35510b 100644 --- a/test/getType/getType.test.js +++ b/test/getType/getType.test.js @@ -5,6 +5,7 @@ test('Testing getType', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof getType === 'function', 'getType is a Function'); + t.equal(getType(new Set([1, 2, 3])), 'set', "Returns the native type of a value"); //t.deepEqual(getType(args..), 'Expected'); //t.equal(getType(args..), 'Expected'); //t.false(getType(args..), 'Expected');