Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed May 21, 2024
1 parent 9b98dad commit 9e9a6cd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions core/test/audits/mainthread-work-breakdown-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@ describe('Performance: page execution timings audit', () => {
const output = await PageExecutionTimings.audit(artifacts, context);
expect(keyOutput(output)).toMatchInlineSnapshot(`
Object {
"garbageCollection": 14,
"other": 188,
"paintCompositeRender": 11,
"parseHTML": 52,
"scriptEvaluation": 577,
"scriptParseCompile": 67,
"styleLayout": 70,
"garbageCollection": 11,
"other": 146,
"paintCompositeRender": 7,
"parseHTML": 19,
"scriptEvaluation": 269,
"scriptParseCompile": 75,
"styleLayout": 71,
}
`);
expect(Math.round(output.numericValue)).toMatchInlineSnapshot(`979`);
expect(Math.round(output.numericValue)).toMatchInlineSnapshot(`597`);
assert.equal(output.details.items.length, 7);
assert.equal(output.score, 1);
expect(output.metricSavings.TBT).toBeCloseTo(171.95, 0.1);
expect(output.metricSavings.TBT).toBeCloseTo(60.29, 0.1);
});

it('should compute the correct values for the load trace (legacy)', async () => {
Expand Down
4 changes: 2 additions & 2 deletions core/test/audits/metrics/interactive-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ describe('Performance: interactive audit', () => {

const context = getFakeContext({formFactor: 'mobile', throttlingMethod: 'provided'});
return Interactive.audit(artifacts, context).then(output => {
assert.equal(output.score, 0.98);
expect(output.numericValue).toMatchInlineSnapshot(`2381.989`);
assert.equal(output.score, 0.97);
expect(output.numericValue).toMatchInlineSnapshot(`2776.05`);
});
});
});

0 comments on commit 9e9a6cd

Please sign in to comment.