Skip to content

Commit

Permalink
squish saveArtifacts and saveAssets together.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Aug 11, 2016
1 parent 0dc81eb commit ea23dbd
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions lighthouse-core/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,12 @@ class Runner {
run = run.then(_ => config.artifacts);
}

// Ignoring these two flags since this functionality is not exposed by the module.
// Ignoring these two flags for coverage as this functionality is not exposed by the module.
/* istanbul ignore next */
if (opts.flags.saveArtifacts) {
if (opts.flags.saveArtifacts || opts.flags.saveAssets) {
run = run.then(artifacts => {
assetSaver.saveArtifacts(artifacts);
return artifacts;
});
}

/* istanbul ignore next */
if (opts.flags.saveAssets) {
run = run.then(artifacts => {
assetSaver.saveAssets(opts, artifacts);
opts.flags.saveArtifacts && assetSaver.saveArtifacts(artifacts);
opts.flags.saveAssets && assetSaver.saveAssets(opts, artifacts);
return artifacts;
});
}
Expand Down

0 comments on commit ea23dbd

Please sign in to comment.