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