Skip to content

Commit

Permalink
oop
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed Mar 28, 2024
1 parent efb72fd commit 302dbe4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/lib/lantern/metrics/total-blocking-time.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ class TotalBlockingTime extends Metric {
static async compute(data, extras) {
const fcpResult = extras?.fcpResult;
if (!fcpResult) {
throw new Error('FCP is required to calculate the SpeedIndex metric');
throw new Error('FCP is required to calculate the TBT metric');
}

Check warning on line 93 in core/lib/lantern/metrics/total-blocking-time.js

View check run for this annotation

Codecov / codecov/patch

core/lib/lantern/metrics/total-blocking-time.js#L92-L93

Added lines #L92 - L93 were not covered by tests

const interactiveResult = extras?.fcpResult;
if (!interactiveResult) {
throw new Error('Interactive is required to calculate the SpeedIndex metric');
throw new Error('Interactive is required to calculate the TBT metric');
}

Check warning on line 98 in core/lib/lantern/metrics/total-blocking-time.js

View check run for this annotation

Codecov / codecov/patch

core/lib/lantern/metrics/total-blocking-time.js#L97-L98

Added lines #L97 - L98 were not covered by tests

return super.compute(data, extras);
Expand Down

0 comments on commit 302dbe4

Please sign in to comment.