Test cleanup and fixes [w-z]

This commit is contained in:
Angelos Chalaris
2018-06-18 19:01:06 +03:00
parent d95d48801b
commit e0561825f6
8 changed files with 118 additions and 106 deletions

View File

@ -1,10 +1,9 @@
const expect = require('expect');
const xProd = require('./xProd.js');
test('xProd is a Function', () => {
test('xProd is a Function', () => {
expect(xProd).toBeInstanceOf(Function);
});
t.deepEqual(xProd([1, 2], ['a', 'b']), [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']], `xProd([1, 2], ['a', 'b']) returns [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]`);
test('xProd([1, 2], [\'a\', \'b\']) returns [[1, \'a\'], [1, \'b\'], [2, \'a\'], [2, \'b\']]', () => {
expect(xProd([1, 2], ['a', 'b'])).toEqual([[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]);
});