1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

nodeify - fix test

This commit is contained in:
kumavis 2017-10-06 13:16:44 -07:00
parent be4f7b33f4
commit 3b3120c5f8

View File

@ -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'))
}
})
})