node.jsmocha.jschaishould.js

Someone knows why mocha throw me error even if everything passed in tests?


I get this error even when everything still right in test

Here the part of code

And someone knows how to ignore this erros?


Solution

  • You are calling done() before all tests have been evaluated, in fact even before you get the result for the requested URL. You need to move the done() call inside the .end callback. I would show you how if you pasted your code. But perhaps it's already clear from this description.