Skip to content

Commit ea23dbd

Browse files
committed
squish saveArtifacts and saveAssets together.
1 parent 0dc81eb commit ea23dbd

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

lighthouse-core/runner.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,12 @@ class Runner {
4646
run = run.then(_ => config.artifacts);
4747
}
4848

49-
// Ignoring these two flags since this functionality is not exposed by the module.
49+
// Ignoring these two flags for coverage as this functionality is not exposed by the module.
5050
/* istanbul ignore next */
51-
if (opts.flags.saveArtifacts) {
51+
if (opts.flags.saveArtifacts || opts.flags.saveAssets) {
5252
run = run.then(artifacts => {
53-
assetSaver.saveArtifacts(artifacts);
54-
return artifacts;
55-
});
56-
}
57-
58-
/* istanbul ignore next */
59-
if (opts.flags.saveAssets) {
60-
run = run.then(artifacts => {
61-
assetSaver.saveAssets(opts, artifacts);
53+
opts.flags.saveArtifacts && assetSaver.saveArtifacts(artifacts);
54+
opts.flags.saveAssets && assetSaver.saveAssets(opts, artifacts);
6255
return artifacts;
6356
});
6457
}

0 commit comments

Comments
 (0)