countOccurrences test edge case
This commit is contained in:
@ -7,3 +7,6 @@ test('countOccurrences is a Function', () => {
|
||||
test('Counts the occurrences of a value in an array', () => {
|
||||
expect(countOccurrences([1, 1, 2, 1, 2, 3], 1)).toEqual(3);
|
||||
});
|
||||
test('Works with different types in the same array', () => {
|
||||
expect(countOccurrences([1, 1, 2, 1, 2, 3, '1', true], 1)).toEqual(3);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user