Monday, 8 May 2017

Istanbul code coverage : how to ignore such lines?

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
  }



via erwin

No comments:

Post a Comment