From 95e641542ae3b59adf5c856cd0fdb0c7fa8d4064 Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Thu, 14 Jan 2016 09:04:47 -0800 Subject: [PATCH] Add shorthand syntax reject test --- test/reject-spec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/reject-spec.js b/test/reject-spec.js index 1a4cf2a..b628cc2 100644 --- a/test/reject-spec.js +++ b/test/reject-spec.js @@ -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; });