From 651ef3cedb58085df375d6067c1f13aaeef5393c Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Fri, 9 Feb 2018 13:40:08 +0200 Subject: [PATCH] Tests for fileLines, runAsync, promisesInSeries --- test/readFileLines/readFileLines.test.js | 3 ++- test/runAsync/runAsync.test.js | 3 ++- .../runPromisesInSeries/runPromisesInSeries.test.js | 4 +++- test/testlog | 13 ++++++++----- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/test/readFileLines/readFileLines.test.js b/test/readFileLines/readFileLines.test.js index 87404799e..db0658908 100644 --- a/test/readFileLines/readFileLines.test.js +++ b/test/readFileLines/readFileLines.test.js @@ -5,9 +5,10 @@ test('Testing readFileLines', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof readFileLines === 'function', 'readFileLines is a Function'); + t.pass('Tested on 09/02/2018 by @chalarangelo'); //t.deepEqual(readFileLines(args..), 'Expected'); //t.equal(readFileLines(args..), 'Expected'); //t.false(readFileLines(args..), 'Expected'); //t.throws(readFileLines(args..), 'Expected'); t.end(); -}); \ No newline at end of file +}); diff --git a/test/runAsync/runAsync.test.js b/test/runAsync/runAsync.test.js index 76e7b11c0..cbe70590b 100644 --- a/test/runAsync/runAsync.test.js +++ b/test/runAsync/runAsync.test.js @@ -5,9 +5,10 @@ test('Testing runAsync', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof runAsync === 'function', 'runAsync is a Function'); + t.pass('Tested on 09/02/2018 by @chalarangelo'); //t.deepEqual(runAsync(args..), 'Expected'); //t.equal(runAsync(args..), 'Expected'); //t.false(runAsync(args..), 'Expected'); //t.throws(runAsync(args..), 'Expected'); t.end(); -}); \ No newline at end of file +}); diff --git a/test/runPromisesInSeries/runPromisesInSeries.test.js b/test/runPromisesInSeries/runPromisesInSeries.test.js index 9011ddaf5..288878bf2 100644 --- a/test/runPromisesInSeries/runPromisesInSeries.test.js +++ b/test/runPromisesInSeries/runPromisesInSeries.test.js @@ -5,9 +5,11 @@ test('Testing runPromisesInSeries', (t) => { //For more information on all the methods supported by tape //Please go to https://github.com/substack/tape t.true(typeof runPromisesInSeries === 'function', 'runPromisesInSeries is a Function'); + const delay = d => new Promise(r => setTimeout(r, d)); + runPromisesInSeries([() => delay(100), () => delay(200).then(() => t.pass('Runs promises in series'))]); //t.deepEqual(runPromisesInSeries(args..), 'Expected'); //t.equal(runPromisesInSeries(args..), 'Expected'); //t.false(runPromisesInSeries(args..), 'Expected'); //t.throws(runPromisesInSeries(args..), 'Expected'); t.end(); -}); \ No newline at end of file +}); diff --git a/test/testlog b/test/testlog index b6f607029..386b5c48a 100644 --- a/test/testlog +++ b/test/testlog @@ -1,4 +1,4 @@ -Test log for: Fri Feb 09 2018 13:35:07 GMT+0200 (GTB Standard Time) +Test log for: Fri Feb 09 2018 13:39:36 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 @@ -1230,6 +1230,7 @@ Test log for: Fri Feb 09 2018 13:35:07 GMT+0200 (GTB Standard Time) Testing readFileLines √ readFileLines is a Function + √ Tested on 09/02/2018 by @chalarangelo Testing rearg @@ -1298,6 +1299,7 @@ Test log for: Fri Feb 09 2018 13:35:07 GMT+0200 (GTB Standard Time) Testing runAsync √ runAsync is a Function + √ Tested on 09/02/2018 by @chalarangelo Testing runPromisesInSeries @@ -1784,14 +1786,15 @@ Test log for: Fri Feb 09 2018 13:35:07 GMT+0200 (GTB Standard Time) Testing zipWith √ zipWith is a Function + √ Runs the function provided √ Sends a GET request + √ Runs promises in series √ Sends a POST request √ Works with multiple promises - √ Runs the functions provided - total: 888 - passing: 888 - duration: 2.5s + total: 891 + passing: 891 + duration: 2.4s