Skip to content

Commit

Permalink
tests(lantern): remove usage of computed SpeedIndex (#16064)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed Jun 11, 2024
1 parent 4285e05 commit 34d913c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions core/test/lib/lantern/metrics/speed-index-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import * as constants from '../../../../config/constants.js';
import {LanternSpeedIndex} from '../../../../computed/metrics/lantern-speed-index.js';
import {readJson} from '../../../test-utils.js';
import {SpeedIndex} from '../../../../lib/lantern/metrics/speed-index.js';
import {FirstContentfulPaint} from '../../../../lib/lantern/metrics/first-contentful-paint.js';
Expand Down Expand Up @@ -62,17 +61,17 @@ Object {
});

it('should not scale coefficients at default', async () => {
const result = LanternSpeedIndex.getScaledCoefficients(defaultThrottling.rttMs);
expect(result).toEqual(LanternSpeedIndex.COEFFICIENTS);
const result = SpeedIndex.getScaledCoefficients(defaultThrottling.rttMs);
expect(result).toEqual(SpeedIndex.COEFFICIENTS);
});

it('should scale coefficients back', async () => {
const result = LanternSpeedIndex.getScaledCoefficients(5);
const result = SpeedIndex.getScaledCoefficients(5);
expect(result).toEqual({intercept: 0, pessimistic: 0.5, optimistic: 0.5});
});

it('should scale coefficients forward', async () => {
const result = LanternSpeedIndex.getScaledCoefficients(300);
const result = SpeedIndex.getScaledCoefficients(300);
expect(result).toMatchInlineSnapshot(`
Object {
"intercept": 0,
Expand Down

0 comments on commit 34d913c

Please sign in to comment.