countOccurrences test edge case

This commit is contained in:
azou1
2018-12-03 14:20:50 -05:00
parent eb738d972b
commit 795a679356

View File

@ -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);
});