It looks like when assert throws an error, skipped and never displayed, as well as code after assert throws is skipped.
Try this (catch the deviation):
it('should return at least 1 contact', function(done) { contact.getContacts().then(function(contacts) { assert.equal(4,2) done() }).then(null, function (err) { console.error(err); done(err); }); })
Or instead (null, rejectFunc) use catch (rejectFunc) with libs like bluebird.
And the answer from idbehold is great. I did not know yet that mocha supports promises directly, and I always use the parameter made, knowing if I have a timeout without a stack trace, there was a swallowed error in this test.
Iliyan Trifonov
source share