Easy way to capture console.log
output, for example
for unit testing
var con = require('console-pop');
con.push();
// call other code that uses console.log
// a copy of the output is stored in con object
var str = con.pop()
// original console.log is restored
assert(/success/i.test(str), 'program reports success')
Author: Gleb Bahmutov © 2014
License: MIT - do anything with the code, but don't blame me if it does not work.
Spread the word: tweet, star on github, etc.
Support: if you find any problems with this module, email / tweet / open issue on Github