Skip to content

a little tool that intercepts console.log output. Ideal for keeping tests output clean

Notifications You must be signed in to change notification settings

jnyryan/log-suppress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#log-suppress

build-status

A little tool that intercepts console.log output. Ideal for keeping tests output clean.

Especially handy for automated tests so that debug statements don't appear in the middle of test output.

Installation

npm install log-suppress --save

Usage

Log-Suppress takes the current console and optional environment

require("log-suppress").init(console);

Or for a specific environment

process.env.NODE_ENV = 'test'
require("log-suppress").init(console, 'test');

Other console modules

Using LogSuppress with other console loggers

require('console-ten').init(console);
require("log-suppress").init(console, 'test')

Developing Log-Suppress

If you are planning to fork this repo and continue developing it then here's some info.

Testing

Run the bash tests

make test

Automated Build

This package used travis to perform automated builds (see that build graphic at the top)

travis-ci

About

a little tool that intercepts console.log output. Ideal for keeping tests output clean

Resources

Stars

Watchers

Forks

Packages

No packages published