add test for no callback error

feature/default_network_editable
frankiebee 7 years ago
parent a8966c4a4f
commit b955b5a89a
  1. 11
      test/unit/nodeify-test.js

@ -17,4 +17,15 @@ describe('nodeify', function () {
done()
})
})
it('should throw if the last argument is not a function', function (done) {
var nodified = nodeify(obj.promiseFunc, obj)
try {
nodified('baz')
done(new Error('should have thrown if the last argument is not a function'))
} catch (err) {
if (err.message === 'callback is not a function') done()
else done(err)
}
})
})

Loading…
Cancel
Save