when performing code coverage , all my .catch() statements are uncovered, is there a way to specify /* istanbul ignore next */ somewhere ?
ex :
function list(req, res, next) {
const { limit = 50, skip = 0 } = req.query;
User.list({ limit, skip })
.then(users => res.json(users))
.catch(e => next(e)); <= this line is marked as uncovered
}
Yep it is, just change .catch(e => next(e));
to
.catch(
/* istanbul ignore next */
(e) => {
next(e);
});