Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to log correctly with Mocha/Velocity (Meteor testing)?

What's the correct way to go about logging out information about tests using the velocity framework with Meteor?

I have some mocha tests that I'd like to output some values from, I guess it'd be good if the output could end up in the logs section of the velocity window... but there doesn't seem to be any documentation anywhere?

like image 461
Anonymous Avatar asked Jan 05 '15 13:01

Anonymous


1 Answers

I haven't seen it documented either.

I don't know how to log messages into the Velocity window, though I don't like the idea of logging into the UI.

What I've done is created a simple Logger object that wraps all of my console.{{method}} calls and prevents logging if process.env.IS_MIRROR. That will only output test framework messages on the terminal. If I need to debug an specific test, I activate logging output for a while on Logger.

like image 93
Tomas Romero Avatar answered Nov 15 '22 10:11

Tomas Romero