Add shorthand syntax reject test

main
Aaron Jensen 2016-01-14 09:04:47 -08:00
parent 7dfda513b2
commit 95e641542a
1 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,12 @@ describe('u.reject', () => {
expect(result).to.eql([3, 5]);
});
it('can reject with callback shorthand', () => {
const result = u.reject('bad', [{ bad: true }, { bad: false }]);
expect(result).to.eql([{ bad: false }]);
});
it('freezes the result', () => {
expect(Object.isFrozen(u.reject('a', []))).to.be.true;
});