Skip to content

Commit

Permalink
test: fix test opening browsers during run
Browse files Browse the repository at this point in the history
  • Loading branch information
TGiles committed Aug 2, 2021
1 parent b0ece08 commit 57c916a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/main/lighthouse_runner.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ describe("openReports", () => {
});
it('should only be called when autoOpen is set to true', () => {
let runner = require('../../lighthouse_runner');
spyOn(runner, "openReports");
spyOn(runner, "openReports").and.callFake(() => true);
spyOn(runner, "main").and.callFake((autoOpen) => {
if (autoOpen) {
runner.openReports();
Expand All @@ -236,7 +236,7 @@ describe("openReports", () => {
it('return true on success', () => {
let runner = require('../../lighthouse_runner');
let port = 8500;
spyOn(runner, "openReports").and.callThrough();
spyOn(runner, "openReports").and.callFake(() => true);
let result = runner.openReports(port);
expect(result).toBeTruthy();
expect(runner.openReports).toHaveBeenCalledWith(port);
Expand Down

0 comments on commit 57c916a

Please sign in to comment.