Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(smoke): add smoke test code coverage #4967

Merged
merged 1 commit into from
Apr 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ script:
- yarn type-check
- yarn closure
- yarn diff:sample-json
- yarn smoke
- yarn smoke:silentcoverage
- yarn test-extension
# _JAVA_OPTIONS is breaking parsing of compiler output. See #3338.
- unset _JAVA_OPTIONS
Expand All @@ -49,5 +49,6 @@ before_cache:
- rm -rf ./node_modules/temp-devtoolsprotocol/
after_success:
- yarn coveralls
- yarn codecov
addons:
chrome: stable
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const libDetectorSource = fs.readFileSync(
* Obtains a list of detected JS libraries and their versions.
* @return {!Array<!{name: string, version: string, npmPkgName: string}>}
*/
/* istanbul ignore next */
/* eslint-disable camelcase */
/* istanbul ignore next */
function detectLibraries() {
const libraries = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const Gatherer = require('../gatherer');

/* global document,window,HTMLLinkElement */

/* istanbul ignore next */
function installMediaListener() {
window.___linkMediaChanges = [];
Object.defineProperty(HTMLLinkElement.prototype, 'media', {
Expand Down
1 change: 1 addition & 0 deletions lighthouse-core/gather/gatherers/seo/robots-txt.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const Gatherer = require('../gatherer');

/* global fetch, URL, location */

/* istanbul ignore next */
function getRobotsTxtContent() {
return fetch(new URL('/robots.txt', location.href))
.then(response => {
Expand Down
1 change: 1 addition & 0 deletions lighthouse-core/lib/dom-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* Combinators are not supported.
* @param {!Array<!Element>}
*/
/* istanbul ignore next */
function getElementsInDocument(selector) {
const results = [];

Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@
"viewer-unit": "yarn unit-viewer",
"watch": "yarn unit-core --watch",

"unit:silentcoverage": "nyc --silent yarn unit",
"unit:silentcoverage": "nyc --silent yarn unit && nyc report --reporter text-lcov > unit-coverage.lcov",
"coverage": "nyc yarn unit && nyc report --reporter html",
"coveralls": "nyc report --reporter lcovonly && cat ./coverage/lcov.info | coveralls && codecov",
"smoke:silentcoverage": "nyc --silent yarn smoke && nyc report --reporter text-lcov > smoke-coverage.lcov",
"coverage:smoke": "nyc yarn smoke && nyc report --reporter html",
"coveralls": "cat unit-coverage.lcov | coveralls",
"codecov": "codecov -f unit-coverage.lcov -F unit && codecov -f smoke-coverage.lcov -F smoke",

"closure": "cd lighthouse-core && node closure/closure-type-checking.js",
"devtools": "bash lighthouse-core/scripts/roll-to-devtools.sh",
Expand Down