Skip to content

Commit 57b1d86

Browse files
committed
add tests
1 parent 27587bc commit 57b1d86

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/arr.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,13 +588,16 @@ test('isMissing', () => {
588588
const arr = Arr.from([1, 2])
589589
expect(Arr.from(null).isMissing(null)).toBe(false)
590590
expect(Arr.from().isMissing(undefined)).toBe(true)
591+
expect(Arr.from(null).isMissing(item => item === null)).toBe(false)
591592

592593
expect(arr.isMissing(3)).toBe(true)
593594
expect(arr.isMissing(null)).toBe(true)
594595
expect(arr.isMissing(undefined)).toBe(true)
595596

596597
expect(arr.isMissing(1)).toBe(false)
597598
expect(arr.isMissing(2)).toBe(false)
599+
expect(arr.isMissing(num => num < 2)).toBe(false)
600+
expect(arr.isMissing(num => num > 2)).toBe(true)
598601
})
599602

600603
test('reduce', () => {

0 commit comments

Comments
 (0)