Tests for fileLines, runAsync, promisesInSeries

This commit is contained in:
Angelos Chalaris
2018-02-09 13:40:08 +02:00
parent f926ebeff7
commit 651ef3cedb
4 changed files with 15 additions and 8 deletions

View File

@ -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();
});
});

View File

@ -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();
});
});

View File

@ -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();
});
});

View File

@ -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