Skip to content

Commit

Permalink
fixed user timing test
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhulce committed May 31, 2017
1 parent f62b2a4 commit d4c4605
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions lighthouse-core/test/audits/user-timing-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,25 @@ describe('Performance: user-timings audit', () => {
});

it('doesn\'t throw when user_timing events have a colon', () => {
return Audit.audit(generateArtifactsWithTrace([
const extraTraceEvents = traceEvents.concat([
{
'pid': 15256,
'pid': 41904,
'tid': 1295,
'ts': 668545368880,
'ph': 'e',
'ts': 1676836141,
'ph': 'R',
'id': 'fake-event',
'cat': 'blink.user_timing',
'name': 'Zone:ZonePromise',
'dur': 64,
'tdur': 61,
'tts': 881373
'tts': 881373,
'args': {},
},
]));
});
]);

return Audit.audit(generateArtifactsWithTrace(extraTraceEvents)).then(result => {
const fakeEvt = result.extendedInfo.value.find(item => item.name === 'Zone:ZonePromise');
assert.ok(fakeEvt, 'failed to find user timing item with colon');
});
});
});

0 comments on commit d4c4605

Please sign in to comment.