Skip to content

Commit

Permalink
only run on -GA
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhulce committed Oct 6, 2020
1 parent 329e0f2 commit c0882eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lighthouse-core/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ class Runner {
// LHR has now been localized.
const lhr = /** @type {LH.Result} */ (i18nLhr);

// Save lhr to ./latest-run, but only if -A is used.
if (settings.auditMode) {
// Save lhr to ./latest-run, but only if -GA is used.
if (settings.gatherMode && settings.auditMode) {
const path = Runner._getDataSavePath(settings);
assetSaver.saveLhr(lhr, path);
}
Expand Down
4 changes: 2 additions & 2 deletions lighthouse-core/test/runner-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe('Runner', () => {
expect(loadArtifactsSpy).toHaveBeenCalled();
expect(gatherRunnerRunSpy).not.toHaveBeenCalled();
expect(saveArtifactsSpy).not.toHaveBeenCalled();
expect(saveLhrSpy).toHaveBeenCalled();
expect(saveLhrSpy).not.toHaveBeenCalled();
expect(runAuditSpy).toHaveBeenCalled();
});
});
Expand Down Expand Up @@ -142,7 +142,7 @@ describe('Runner', () => {
assert.strictEqual(lhr.runtimeError, undefined);
});

it('-GA is a normal run but it saves artifacts to disk', () => {
it('-GA is a normal run but it saves artifacts and LHR to disk', () => {
const settings = {auditMode: artifactsPath, gatherMode: artifactsPath};
const opts = {url, config: generateConfig(settings), driverMock};
return Runner.run(null, opts).then(_ => {
Expand Down

0 comments on commit c0882eb

Please sign in to comment.