Skip to content

Commit

Permalink
fix dom-size test
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed Jun 4, 2024
1 parent aa54aa2 commit 19dd64d
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions core/test/audits/dobetterweb/dom-size-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,17 @@ describe('DOMSize audit', () => {

beforeEach(() => {
const mainDocumentUrl = 'https://example.com/';

const networkRecords = [{url: mainDocumentUrl, priority: 'High'}];
const trace = createTestTrace({
topLevelTasks: [
{ts: 1000, duration: 1000, children: [
{ts: 1100, duration: 200, eventName: 'ScheduleStyleRecalculation'},
]},
],
networkRecords,
});

const devtoolsLog = networkRecordsToDevtoolsLog([{
url: mainDocumentUrl,
priority: 'High',
}]);
const devtoolsLog = networkRecordsToDevtoolsLog(networkRecords);

artifacts = {
DOMStats: {
Expand All @@ -55,11 +53,6 @@ describe('DOMSize audit', () => {
});

it('calculates score hitting mid distribution', async () => {
// TODO(15841): investigate failures
if (process.env.INTERNAL_LANTERN_USE_TRACE !== undefined) {
return;
}

const auditResult = await DOMSize.audit(artifacts, context);
assert.equal(auditResult.score, 0.43);
assert.equal(auditResult.numericValue, 1500);
Expand Down

0 comments on commit 19dd64d

Please sign in to comment.