Skip to content

Commit

Permalink
Less duplication in objects.spec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sadasant committed Mar 14, 2017
1 parent c9630b6 commit c8f581f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/objects.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ describe('Object Functions', () => {
})
})
it('isEmptyObject', () => {
expect(f.isEmptyObject({ a: 1 })).to.equal(false)
expect(f.isEmptyObject({})).to.equal(true)
let expectEql = (obj, v) => expect(f.isEmptyObject(obj)).to.equal(v)
expectEql({ a: 1 }, false)
expectEql({}, true)
})
it('isNotEmptyObject', () => {
expect(f.isNotEmptyObject({ a: 1 })).to.equal(true)
expect(f.isNotEmptyObject({})).to.equal(false)
let expectEql = (obj, v) => expect(f.isNotEmptyObject(obj)).to.equal(v)
expectEql({ a: 1 }, true)
expectEql({}, false)
})
it('stripEmptyObjects', () => {
expect(f.stripEmptyObjects({
Expand Down

0 comments on commit c8f581f

Please sign in to comment.