simple-output
Advanced tools
Comparing version 0.2.0 to 0.2.2
{ | ||
"name": "simple-output", | ||
"version": "0.2.0", | ||
"main": "lib/simple-output.js", | ||
"version": "0.2.2", | ||
"main": "index.js", | ||
"description": "Output messages to stdout/stderr", | ||
@@ -14,3 +14,3 @@ "homepage": "https://github.com/ruyadorno/simple-output", | ||
"type": "git", | ||
"url": "user/repo" | ||
"url": "https://github.com/ruyadorno/simple-output.git" | ||
}, | ||
@@ -17,0 +17,0 @@ "licenses": [ |
# simple-output | ||
version: 0.2.0 | ||
version: 0.2.2 | ||
@@ -28,4 +28,22 @@ [![Build Status](https://travis-ci.org/ruyadorno/simple-output.svg?branch=master)](https://travis-ci.org/SunGard-Labs/grunt-sg-release) | ||
## Testing | ||
This module helps on testing your output data by exposing the streams 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. See the example below: | ||
```javascript | ||
var log = require('simple-output'); | ||
log.stdout = { | ||
write: function(msg) { | ||
assert(msg, 'hello world'); | ||
} | ||
}; | ||
log.message('hello world'); | ||
``` | ||
## License | ||
Copyright (c) 2014 Ruy Adorno. Licensed under the MIT license. | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3940
49