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

11 lines
360 B
JavaScript

const expect = require('expect');
const permutations = require('./permutations.js');
test('permutations is a Function', () => {
expect(permutations).toBeInstanceOf(Function);
});
t.deepEqual(permutations([1, 33, 5]), [ [ 1, 33, 5 ], [ 1, 5, 33 ], [ 33, 1, 5 ], [ 33, 5, 1 ], [ 5, 1, 33 ], [ 5, 33, 1 ] ], 'Generates all permutations of an array');