simple-output
Pretty output messages to stdout/stderr
Getting Started
Install the module with: npm install simple-output
Examples
var log = ; log;
Available methods
- success(msg)
- error(msg)
- info(msg)
- message(msg)
- node(msg)
- warn(msg)
Testing
This module helps on testing your output data by making it simpler to mock simple-output
and its methods or use the exposed streams interface to which the data gets written to.
In order to test your output information, replace the stdout/stderr properties with an mock object containing a write function (simulating the streams api). See the example below:
Mock simpleOutput.stdout
var log = ;var myModule = ; logstdout = { ; }; myModule;
Using a mocking library
var requireInject = ; var myModule = ; myModule;
License
MIT © 2019 Ruy Adorno