Skip to content

Commit

Permalink
fix test bitrot
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed May 4, 2023
1 parent 5e8293e commit 046bae7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/legacy/config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class LegacyResolvedConfig {
}

/**
* @deprecated `Config.fromJson` should be used instead.
* @deprecated `LegacyResolvedConfig.fromJson` should be used instead.
* @constructor
* @param {LH.Config} config
* @param {{settings: LH.Config.Settings, passes: ?LH.Config.Pass[], audits: ?LH.Config.AuditDefn[]}} opts
Expand Down
1 change: 1 addition & 0 deletions core/test/gather/driver/execution-context-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ describe('.evaluateAsync', () => {
.mockResponse('Page.enable')
.mockResponse('Runtime.enable')
.mockResponse('Page.getResourceTree', {frameTree: {frame: {id: '1337'}}})
.mockResponse('Page.getFrameTree', {frameTree: {frame: {id: '1337'}}})
.mockResponse('Page.createIsolatedWorld', {executionContextId: 9001})
.mockResponse('Runtime.evaluate', {exceptionDetails});

Expand Down
4 changes: 3 additions & 1 deletion core/test/lib/asset-saver-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,9 @@ describe('asset-saver helper', () => {
// Use an LighthouseError that has an ICU replacement.
const protocolMethod = 'Page.getFastness';
const lhError = new LighthouseError(
LighthouseError.errors.PROTOCOL_TIMEOUT, {protocolMethod}, new Error('the cause'));
LighthouseError.errors.PROTOCOL_TIMEOUT,
{protocolMethod},
{cause: new Error('the cause')});

const artifacts = {
traces: {},
Expand Down
4 changes: 2 additions & 2 deletions core/test/runner-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ describe('Runner', () => {

it('produces an error audit result that prefers cause stack', async () => {
const errorMessage = 'Audit yourself';
const config = await Config.fromJson({
const resolvedConfig = await LegacyResolvedConfig.fromJson({
settings: {
auditMode: moduleDir + '/fixtures/artifacts/empty-artifacts/',
},
Expand All @@ -629,7 +629,7 @@ describe('Runner', () => {
],
});

return runGatherAndAudit({}, {config}).then(results => {
return runGatherAndAudit({}, {resolvedConfig}).then(results => {
const auditResult = results.lhr.audits['throwy-audit'];
assert.strictEqual(auditResult.score, null);
assert.strictEqual(auditResult.scoreDisplayMode, 'error');
Expand Down

0 comments on commit 046bae7

Please sign in to comment.