New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mocha-pretty-bunyan

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha-pretty-bunyan

mocha pretty output bunyan

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

mocha-pretty-bunyan

description

bunyan is a pretty nice package to log in json format, and provides an awesome cli to display it in human readable way.

But, when you run your test with mocha, you cannot take benefit of the cli, so you then get raw json logs that is a mess to read.

mocha-pretty-bunyan provides a mocha reporter Spec (by default) that display bunyan with a pretty/human readble format in the context of the mocha default reporter.

Install

npm install mocha-pretty-bunyan --save-dev

Usage

mocha --reporter mocha-pretty-bunyan

example of output:

[12:02:28] Using gulpfile ~/Dev/node2/ticketing/gulpfile.js
[12:02:28] Starting 'test'...
[2016-06-18T10:02:29.642Z]  INFO: db/43349 on xxxx-MacBook-Air.local: start mongodb
[2016-06-18T10:02:29.683Z]  INFO: db/43349 on xxxx-MacBook-Air.local: open
[2016-06-18T10:02:29.746Z]  INFO: mocha/43349 on xxxx-MacBook-Air.local: QR a1a6a5da-4cce-48f6-a52b-fb3490e3d84d"
[2016-06-18T10:02:29.749Z]  INFO: mocha/43349 on xxxx-MacBook-Air.local: done
[2016-06-18T10:02:29.749Z] DEBUG: mocha/43349 on xxxx-MacBook-Air.local: debug
 1   -__,------,
 0   -__|  /\_/\
 0   -_~|_( ^ .^)
     -_ ""  ""

  1 passing (123ms)

[12:02:29] Finished 'test' after 1.4 s

mochabunyan.opts

It is possible to configure few things by putting in the test directory a file test/mochabunyan.opts that could contains the following options: mute set it true if you want to mute all logs level if you want to set the global log level reporter if you want to use a different reporter that Spec

ex:

{ "mute": false, "level": "debug", "reporter": "nyan" }

Keywords

FAQs

Package last updated on 12 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc