Files
30-seconds-of-code/test/powerset/powerset.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

10 lines
281 B
JavaScript

const expect = require('expect');
const powerset = require('./powerset.js');
test('powerset is a Function', () => {
expect(powerset).toBeInstanceOf(Function);
});
t.deepEqual(powerset([1, 2]), [[], [1], [2], [2,1]], "Returns the powerset of a given array of numbers.");