diff --git a/test/countOccurrences.test.js b/test/countOccurrences.test.js index 5ac6c1e1d..2213fd39e 100644 --- a/test/countOccurrences.test.js +++ b/test/countOccurrences.test.js @@ -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); +});