I'm making a Jest test with request
describe("GET /user ", () => {
test("It should respond with a array of users", done => {
return request(url, (err, res, body) => {
if (err) {
console.log(err)
} else {
console.log("GET on " + url);
body = JSON.parse(body);
expect(body.length).toBeGreaterThan(0);
done();
}
})
})
});
and it's weird because in the terminal, jest is showing console.log line as part of the output:
...test output...
console.log test/modules/user.test.js:18
GET on https://xpto/api/user
...more test output...
I need to hide the line:
console.log test/modules/user.test.js:18
How to hide console.log line in Jest output?