how can prevent morgan to work in test enviroment

Solutions on MaxInterview for how can prevent morgan to work in test enviroment by the best coders in the world

showing results for - "how can prevent morgan to work in test enviroment"
Leni
10 Oct 2017
1const logger = require('morgan');
2const app = express();
3app.use(logger('dev', { skip: (req, res) => process.env.NODE_ENV === 'test' }));