it('does not call callback and returns false if err provided', () => { const cb = sinon.stub(); const actual = notate(cb, null); expect(actual).to.equal(false); expect(cb).to.have.property('callCount', 0); });
it('calls callback and returns true if err provided', () => { const cb = sinon.stub(); const actual = notate(cb, new Error()); expect(actual).to.equal(true); expect(cb).to.have.property('callCount', 1); });
expect(() => { notate(cb, null); }).to.throw(Error)