I would like to know why this ES6 line is marked as non covered:
package.json
....
"test:v1:coverage": "cross-env NODE_ENV=test ./node_modules/.bin/nyc _mocha
--timeout 15000 --ui bdd --colors --compilers js:babel-core/register
server/v1/tests --recursive",
...
"nyc": {
"require": [
"babel-register"
],
"exclude": [
"**/server/helpers/tests.utility.js"
],
"sourceMap": false,
"instrument": false
}
resulting report :
------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
---|----------|----------|----------|----------|----------------|
um.js | 100 | 40 | 100 | 100 | 113 |
user.model.js (um.js)
....
list({ skip = 0, limit = 50 } = {}) {. :: <= line 113
console.log('USER MODEL LIST');
return this.find()
.sort({ createdAt: -1 })
.skip(skip)
.limit(limit)
.exec();
}
....
this method is run, as the console.log display the message:
# GET /api/v1/users/
USER MODEL LIST
Mongoose: users.find({}, { sort: { createdAt: -1 }, skip: 0, limit: 50, fields: {} })
thanks for your feedbacks
via erwin
No comments:
Post a Comment