Skip to content

Commit

Permalink
Fix typo in coverage
Browse files Browse the repository at this point in the history
This patch:
- fixes typo in coverage
- enables coverage on Travis CI

References puppeteer#50.
  • Loading branch information
aslushnikov committed Jul 27, 2017
1 parent a2e0d27 commit 47a0366
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ install:
# puppeteer's install script downloads Chrome
script:
- yarn run lint
- yarn run unit
- yarn run coverage
- yarn run test-phantom
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ npm run debug-unit
There are also phantomjs tests located under [third_party/phantomjs/test](https://github.com/GoogleChrome/puppeteer/tree/master/third_party/phantomjs). These
are used to test `phantom_shim`.

## Public API Coverage

Every public API method should be called at least once during `npm run unit` command.
To ensure this, there's a `npm run coverage` command which tracks public API usage and reports back if some methods were not called.

## Debugging
Puppeteer uses [DEBUG](https://github.com/visionmedia/debug) module to expose some of it's inner guts under the `puppeteer` namespace.
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ if (process.env.COVERAGE) {

for (let method of coverage.keys()) {
(disabled.has(method) ? xit : it)(`public method '${method}' was tested`, SX(async function(){
expect(publicAPICoverage.get(method)).toBe(true);
expect(coverage.get(method)).toBe(true);
}));
}
});
Expand Down

0 comments on commit 47a0366

Please sign in to comment.