javascript - Mocha async tests, calling done() issue -
i'm developing postcss plugin , want test mocha. here test:
function exec(cb) { postcss() .use(regexp) .process(source) .then(cb); } it('should add warnings messages', function(done) { var expected = 'somemessage'; var message = ''; function getmessage(result) { message = result.messages; assert.equal(message, expected); done(); } exec(getmessage); });
but fails , error: timeout of 2000ms exceeded. ensure done() callback being called in test
.
what doing wrong?
your callback not getting called within default timeout of 2000 ms.
if sure there nothing wrong in exec plugin , expected take more 2s , can increase time using
Comments
Post a Comment