mute

Politely tells stdout and stderr to shut the heck up for a moment.

npm install mute
2 downloads in the last week
12 downloads in the last month

mute

Politely tells stdout and stderr to shut the heck up for a moment by temporarily reassigning the stream's write methods. Useful when testing overly noisey things like Yeoman generators.

it('should shut the heck up', function (done) {
    mute(function(unmute) {
        app.options.defaults = true;

        app.run(function() {
            unmute();

            helpers.assertFiles([
                ['package.json', /"name": "temp-directory"/],
                ['README.md',    /# TEMP.Directory/]
            ]);

            done();
        });
    });
});

Installation

This should really only ever be used in test code.

$ npm install --save-dev mute

License

MIT

npm loves you