コード例 #1
0
ファイル: test_notate.js プロジェクト: scottnonnenberg/notate
    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);
    });
コード例 #2
0
ファイル: test_notate.js プロジェクト: scottnonnenberg/notate
    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);
    });
コード例 #3
0
ファイル: test_notate.js プロジェクト: scottnonnenberg/notate
 expect(() => {
   notate(cb, null);
 }).to.throw(Error)