Add shorthand syntax reject test
This commit is contained in:
parent
7dfda513b2
commit
95e641542a
@ -8,6 +8,12 @@ describe('u.reject', () => {
|
|||||||
expect(result).to.eql([3, 5]);
|
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', () => {
|
it('freezes the result', () => {
|
||||||
expect(Object.isFrozen(u.reject('a', []))).to.be.true;
|
expect(Object.isFrozen(u.reject('a', []))).to.be.true;
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user