From 46c9594445f1240621af959c3ed8f2eeeb14f240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Feje=C5=A1?= Date: Wed, 10 Jan 2018 14:59:07 +0100 Subject: [PATCH] add 2 tests, lcm & longestItem --- test/lcm/lcm.test.js | 3 +++ test/longestItem/longestItem.test.js | 1 + 2 files changed, 4 insertions(+) diff --git a/test/lcm/lcm.test.js b/test/lcm/lcm.test.js index a0278b76e..ce1e5b679 100644 --- a/test/lcm/lcm.test.js +++ b/test/lcm/lcm.test.js @@ -5,6 +5,9 @@ test('Testing lcm', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof lcm === 'function', 'lcm is a Function'); + t.equal(lcm(12, 7), 84, "Returns the least common multiple of two or more numbers."); + t.equal(lcm(...[1, 3, 4, 5]), 60, "Returns the least common multiple of two or more numbers."); + //t.deepEqual(lcm(args..), 'Expected'); //t.equal(lcm(args..), 'Expected'); //t.false(lcm(args..), 'Expected'); diff --git a/test/longestItem/longestItem.test.js b/test/longestItem/longestItem.test.js index 3a12097f9..9e09b19c2 100644 --- a/test/longestItem/longestItem.test.js +++ b/test/longestItem/longestItem.test.js @@ -5,6 +5,7 @@ test('Testing longestItem', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof longestItem === 'function', 'longestItem is a Function'); + t.deepEqual(longestItem('this', 'is', 'a', 'testcase'), 'testcase', "Returns the longest object"); //t.deepEqual(longestItem(args..), 'Expected'); //t.equal(longestItem(args..), 'Expected'); //t.false(longestItem(args..), 'Expected');