ran npm run tdd & generated TDD
This commit is contained in:
6
test/zip/zip.js
Normal file
6
test/zip/zip.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = (...arrays) => {
|
||||
const maxLength = Math.max(...arrays.map(x => x.length));
|
||||
return Array.from({ length: maxLength }).map((_, i) => {
|
||||
return Array.from({ length: arrays.length }, (_, k) => arrays[k][i]);
|
||||
});
|
||||
};
|
||||
13
test/zip/zip.test.js
Normal file
13
test/zip/zip.test.js
Normal file
@ -0,0 +1,13 @@
|
||||
const test = require('tape');
|
||||
const zip = require('./zip.js');
|
||||
|
||||
test('Testing zip', (t) => {
|
||||
//For more information on all the methods supported by tape
|
||||
//Please go to https://github.com/substack/tape
|
||||
t.true(typeof zip === 'function', 'zip is a Function');
|
||||
//t.deepEqual(zip(args..), 'Expected');
|
||||
//t.equal(zip(args..), 'Expected');
|
||||
//t.false(zip(args..), 'Expected');
|
||||
//t.throws(zip(args..), 'Expected');
|
||||
t.end();
|
||||
});
|
||||
Reference in New Issue
Block a user