diff --git a/test/reduceSuccessive/reduceSuccessive.test.js b/test/reduceSuccessive/reduceSuccessive.test.js index 87ec36cdd..411438820 100644 --- a/test/reduceSuccessive/reduceSuccessive.test.js +++ b/test/reduceSuccessive/reduceSuccessive.test.js @@ -5,9 +5,10 @@ test('Testing reduceSuccessive', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof reduceSuccessive === 'function', 'reduceSuccessive is a Function'); + t.deepEqual(reduceSuccessive([1, 2, 3, 4, 5, 6], (acc, val) => acc + val, 0), [0, 1, 3, 6, 10, 15, 21], 'Returns the array of successively reduced values'); //t.deepEqual(reduceSuccessive(args..), 'Expected'); //t.equal(reduceSuccessive(args..), 'Expected'); //t.false(reduceSuccessive(args..), 'Expected'); //t.throws(reduceSuccessive(args..), 'Expected'); t.end(); -}); \ No newline at end of file +}); diff --git a/test/reduceWhich/reduceWhich.test.js b/test/reduceWhich/reduceWhich.test.js index c5363239b..7e38f36d0 100644 --- a/test/reduceWhich/reduceWhich.test.js +++ b/test/reduceWhich/reduceWhich.test.js @@ -5,9 +5,15 @@ test('Testing reduceWhich', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof reduceWhich === 'function', 'reduceWhich is a Function'); + t.equal(reduceWhich([1, 3, 2]), 1, 'Returns the minimum of an array'); + t.equal(reduceWhich([1, 3, 2], (a, b) => b - a), 3, 'Returns the maximum of an array'); + t.deepEqual(reduceWhich( + [{ name: 'Tom', age: 12 }, { name: 'Jack', age: 18 }, { name: 'Lucy', age: 9 }], + (a, b) => a.age - b.age +), {name: "Lucy", age: 9}, 'Returns the object with the minimum specified value in an array'); //t.deepEqual(reduceWhich(args..), 'Expected'); //t.equal(reduceWhich(args..), 'Expected'); //t.false(reduceWhich(args..), 'Expected'); //t.throws(reduceWhich(args..), 'Expected'); t.end(); -}); \ No newline at end of file +}); diff --git a/test/removeNonASCII/removeNonASCII.test.js b/test/removeNonASCII/removeNonASCII.test.js index 99d05cf44..03aedfed1 100644 --- a/test/removeNonASCII/removeNonASCII.test.js +++ b/test/removeNonASCII/removeNonASCII.test.js @@ -5,9 +5,10 @@ test('Testing removeNonASCII', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof removeNonASCII === 'function', 'removeNonASCII is a Function'); + t.equal(removeNonASCII('äÄçÇéÉêlorem-ipsumöÖÐþúÚ'), 'lorem-ipsum', 'Removes non-ASCII characters'); //t.deepEqual(removeNonASCII(args..), 'Expected'); //t.equal(removeNonASCII(args..), 'Expected'); //t.false(removeNonASCII(args..), 'Expected'); //t.throws(removeNonASCII(args..), 'Expected'); t.end(); -}); \ No newline at end of file +}); diff --git a/test/testlog b/test/testlog index 3d0680c11..e0e045fc7 100644 --- a/test/testlog +++ b/test/testlog @@ -1,4 +1,4 @@ -Test log for: Sat Feb 03 2018 12:32:27 GMT+0200 (GTB Standard Time) +Test log for: Sat Feb 03 2018 12:51:49 GMT+0200 (GTB Standard Time) > 30-seconds-of-code@0.0.1 test G:\My Files\git Repositories\30-seconds-of-code > tape test/**/*.test.js | tap-spec @@ -1142,10 +1142,14 @@ Test log for: Sat Feb 03 2018 12:32:27 GMT+0200 (GTB Standard Time) Testing reduceSuccessive √ reduceSuccessive is a Function + √ Returns the array of successively reduced values Testing reduceWhich √ reduceWhich is a Function + √ Returns the minimum of an array + √ Returns the maximum of an array + √ Returns the object with the minimum specified value in an array Testing remove @@ -1155,6 +1159,7 @@ Test log for: Sat Feb 03 2018 12:32:27 GMT+0200 (GTB Standard Time) Testing removeNonASCII √ removeNonASCII is a Function + √ Removes non-ASCII characters Testing removeVowels @@ -1648,8 +1653,8 @@ Test log for: Sat Feb 03 2018 12:32:27 GMT+0200 (GTB Standard Time) √ Works with multiple promises - total: 752 - passing: 752 + total: 757 + passing: 757 duration: 2.4s