Test migration to jest by hand
Apparently using regular expressions is way easier.
This commit is contained in:
10
test/flatten/flatten.test.js
Normal file
10
test/flatten/flatten.test.js
Normal file
@ -0,0 +1,10 @@
|
||||
const expect = require('expect');
|
||||
const flatten = require('./flatten.js');
|
||||
|
||||
|
||||
test('flatten is a Function', () => {
|
||||
expect(flatten).toBeInstanceOf(Function);
|
||||
});
|
||||
t.deepEqual(flatten([1, [2], 3, 4]), [1, 2, 3, 4], "Flattens an array");
|
||||
t.deepEqual(flatten([1, [2, [3, [4, 5], 6], 7], 8], 2), [1, 2, 3, [4, 5], 6, 7, 8], "Flattens an array");
|
||||
|
||||
Reference in New Issue
Block a user