Files
30-seconds-of-code/test/xProd/xProd.test.js
Angelos Chalaris 4f7da1be9b Test migration to jest by hand
Apparently using regular expressions is way easier.
2018-06-18 15:15:56 +03:00

11 lines
323 B
JavaScript

const expect = require('expect');
const xProd = require('./xProd.js');
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']]`);