12 lines
292 B
JavaScript
12 lines
292 B
JavaScript
const expect = require('expect');
|
|
const initial = require('./initial.js');
|
|
|
|
|
|
test('initial is a Function', () => {
|
|
expect(initial).toBeInstanceOf(Function);
|
|
});
|
|
test('Returns all the elements of an array except the last one', () => {
|
|
expect(initial([1, 2, 3]), [1).toEqual(2])
|
|
});
|
|
|