Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should log to the console', () => {
let out = '';
const unhook = hookStd.stdout({ silent: true }, output => {
out += output;
});
log.setLevel('info');
log.info('foobar');
unhook();
const expected = out.trim();
expected.should.containEql('info: foobar');
});
});
it("logs to the console", function() {
var out = '';
var unhook = hookStd.stdout({silent: true}, function(output) {
out += output;
});
log.setLevel('info');
log.info('foobar');
unhook();
var expected = out.trim();
expected.should.containEql('info: foobar');
});
});