Skip to content

Commit

Permalink
add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
aleclarson committed Jul 7, 2024
1 parent e1e019c commit 3cf85dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/object/pick.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,11 @@ describe('pick', () => {
a: 2,
})
})
test('works with predicate function', () => {
const result = _.pick({ a: 1, b: 2, c: 3, d: 4 }, value => value % 2 === 0)
expect(result).toEqual({
b: 2,
d: 4,
})
})
})

0 comments on commit 3cf85dd

Please sign in to comment.