Test cleanup and fixes [c-d]
This commit is contained in:
@ -5,6 +5,10 @@ const minN = require('./minN.js');
|
||||
test('minN is a Function', () => {
|
||||
expect(minN).toBeInstanceOf(Function);
|
||||
});
|
||||
t.deepEqual(minN([1, 2, 3]), [1], "Returns the n minimum elements from the provided array");
|
||||
t.deepEqual(minN([1, 2, 3], 2), [1, 2], "Returns the n minimum elements from the provided array");
|
||||
test('Returns the n minimum elements from the provided array', () => {
|
||||
expect(minN([1, 2, 3])).toEqual([1])
|
||||
});
|
||||
test('Returns the n minimum elements from the provided array', () => {
|
||||
expect(minN([1, 2, 3], 2), [1).toEqual(2])
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user