AleG94 / mocha-suppress-logs

Suppress console output of successful mocha tests
MIT License
13 stars 3 forks source link

please release `log-capture.js` as a standalone module. #4

Open vassudanagunta opened 3 years ago

vassudanagunta commented 3 years ago

(I hope you don't mind, but thought I'd convert my wish here into an issue so that I can get notified if you ever do it 🙂)

You ought to release log-capture.js as a standalone module.

I've been using log-interceptor for another part of my project. It's more sophisticated (e.g. supports nested log suppression calls) but I never used any of that. The one difference that is significant is that it captures all stdout.write calls, not just console.* calls. I'm not sure that's better, though it's nice to have as an option.

In any case there are other uses for log capture / deferral / redirection beyond Mocha. log-capture.js is small, but its nice and its tested and I haven't found any great alternatives, besides log-interceptor, which is no longer maintained, and which doesn't capture each different console log level separately as log-capture does.

AleG94 commented 3 years ago

No worries 😂

Thanks for the reminder, I had forgotten about it.