I am using javascript test-runner "Mocha".
I have a test that fails, so I would debug it using console.log .
But when the tests are executed, there is no way out (only the test results from Mocha). Mocha seems to have grabbed and suppressed console.log output!
How can I get mocha to output my output? (for failed tests)?
EDIT:
Huge apologies! - console.log works during tests! I must have expected it to suppress the output and I was not able to test my own code. Thanks for answering. So ... what was said ... maybe it would be nice to suppress the output for tests that pass? hmm ...
Regarding the note: I want to use console.log because I have a lot of problems trying to get the Eclipse debugger to connect to node.js.
Am I the only one who finds this difficult? How do you guys debug node.js? With a debugger or with console.log statements?
Nick Perkins May 19 '12 at 15:07 2012-05-19 15:07
source share