()
| 50 | let errback = eb ? sinon.spy(eb) : sinon.spy() |
| 51 | |
| 52 | function assertCallback() { |
| 53 | assert.ok(callback.called, 'callback not called') |
| 54 | assert.ok(!errback.called, 'errback called') |
| 55 | if (callback.threw()) { |
| 56 | throw callback.exceptions[0] |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | function assertErrback() { |
| 61 | assert.ok(!callback.called, 'callback called') |