Fix service coverage script and linting (#975)

* Fix "callback is not a function" in coverage:test:services

* Don't lint /coverage
This commit is contained in:
Paul Melnikow
2017-04-29 20:31:07 -04:00
committed by Daniel Lo Nigro
parent 02fc1a1a21
commit 8233a0ba38
3 changed files with 3 additions and 4 deletions

1
.eslintignore Normal file
View File

@@ -0,0 +1 @@
/coverage

View File

@@ -37,7 +37,7 @@
},
"scripts": {
"coverage:test:js": "istanbul cover _mocha '*.spec.js' 'lib/*.spec.js' --dir coverage/js",
"coverage:test:services": "istanbul cover _mocha --delay service-tests/runner/cli.js --dir coverage/services",
"coverage:test:services": "istanbul cover _mocha service-tests/runner/cli.js --dir coverage/services -- --delay",
"coverage:test": "npm run coverage:test:js && npm run coverage:test:services",
"coverage:report": "istanbul report",
"coverage:report:reopen": "opn coverage/lcov-report/index.html",

View File

@@ -259,12 +259,10 @@ By checking code coverage, we can make sure we've covered all our bases.
We can generate a coverage report and open it:
```
npm run coverage:test:services -- -- --only=travis
npm run coverage:test:services -- --only=travis
npm run coverage:report:open
```
Note the two sets of double dashes.
After searching `server.js` for the Travis code, we see that we've missed a
big block: the error branch in the request callback. To test that, we simulate
network connection errors on any unmocked requests.