Browse Source

Close #264 PR: Fix coverage.

Due to NYC defaults, we were missing coverage on lib/test.js

I also added `npm run coverage` as a build target, which is for use
on developer machines. It launches a browser window with coverage
from the last run.

We no longer need NYC as a dev dependency. `tap` handles it for us.

`maintaining.md` updated to reflect all these changes.
babel-plugin-for-integration-tests
James Talmage 9 years ago
committed by Sindre Sorhus
parent
commit
4852c92c9c
  1. 1
      .gitignore
  2. 8
      maintaining.md
  3. 14
      package.json

1
.gitignore

@ -1,2 +1,3 @@
node_modules
.nyc_output
coverage

8
maintaining.md

@ -1,6 +1,14 @@
# Maintaining
## Testing
- `npm test`: Lint the code and run the entire test suite with coverage.
- `npm run test-win`: Run the tests on Windows.
- `npm run coverage`: Generate a coverage report for the last test run (opens a browser window).
- `tap test/fork.js --bail`: Run a specific test file and bail on the first failure (useful when hunting bugs).
## Release process
- Bump dependencies.

14
package.json

@ -38,8 +38,9 @@
},
"scripts": {
"test": "xo && tap --coverage --reporter=spec --timeout=150 test/*.js",
"test-win": "tap --coverage --reporter=spec --timeout=150 test/*.js",
"coveralls": "nyc report --reporter=text-lcov | coveralls"
"test-win": "tap --reporter=spec --timeout=150 test/*.js",
"coveralls": "tap --coverage-report=text-lcov | coveralls",
"coverage": "tap --coverage-report=lcov"
},
"files": [
"index.js",
@ -112,10 +113,17 @@
},
"devDependencies": {
"coveralls": "^2.11.4",
"nyc": "^3.2.2",
"signal-exit": "^2.1.2",
"tap": "^2.2.1",
"xo": "*",
"zen-observable": "^0.1.6"
},
"config": {
"nyc": {
"exclude": [
"node_modules[/\\\\]",
"test[/\\\\]"
]
}
}
}

Loading…
Cancel
Save