Skip to content

Commit

Permalink
test: add curry tests for pokeprop
Browse files Browse the repository at this point in the history
use curried pokeprop to get a property from an object
  • Loading branch information
vitorabner committed May 2, 2017
1 parent 0895aa3 commit 0f9e5c4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/pokeprop.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,9 @@ test('pokeprop: pick multiplies properties from an object with multiples propert
}
})
})

test('pokeprop: pick lib property from an object with one property using pokeprop curried', t => {
const object = { lib: 'pokeprop' }
const picked = pokeprop(['lib'])(object)
t.deepEqual(picked, object)
})

0 comments on commit 0f9e5c4

Please sign in to comment.