Closed SET001 closed 10 years ago
Sorry, I just have to read manual about error handling:
is_connected.promise ->
console.log "resolved!"
assert.equal 1, 2
done()
.done()
is_connected.resolve()
Exactly, and a bit cleaner would be:
isConnected.promise.done(function () {
console.log("resolved!");
assert.equal(1, 2);
done();
});
isConnected.promise()
is same as isConnected.promise.then()
so it creates transformation promise, and implies unfortunate in that case error swallowing
How can this library be user with nodejs asserts (library for unit testing)? It seem's like it handle any exception inside promise callback so it is not possible to use assertions:
Writing tests in such a way I would never know about fails. How I can handle this?