nodeify - fix test

feature/default_network_editable
kumavis 7 years ago
parent be4f7b33f4
commit 3b3120c5f8
  1. 7
      test/unit/nodeify-test.js

@ -18,14 +18,13 @@ describe('nodeify', function () {
})
})
it('should throw if the last argument is not a function', function (done) {
it('should allow the last argument to not be a function', function (done) {
const nodified = nodeify(obj.promiseFunc, obj)
try {
nodified('baz')
done(new Error('should have thrown if the last argument is not a function'))
} catch (err) {
assert.equal(err.message, 'callback is not a function')
done()
} catch (err) {
done(new Error('should not have thrown if the last argument is not a function'))
}
})
})

Loading…
Cancel
Save