Hi, i've this code:
module.exports.run = function(event, context, cb) {
myclass.queryAsync(...)
.then(function (results) {
if (results.field === "test") {
throw "error";
} else {
return cb(null, "success");
}
})
.catch(function (err) {
return cb(err)
});
};
for promise i'm using bluebirdjs and i've attached this code to a mocha
test. If function give back a success, the test passes without problems. If
the test has errors, the stdout give back: Unhandled rejection null, the
mocha test goes on and then stops with exceeded timeout limit.
My mocha test:
before("Description", function(done) {
require('path').run(event.options, {}, function (err, results) {
if (err) {
throw err;
}
done();
});
});
Some suggestions about that?
Thanks for your time.
Best regards
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/7861ce33-fdca-42ca-9d90-391d2f17c53d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.