Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(lantern): fix some tests not running #16073

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/lib/lantern/metrics/FirstContentfulPaint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {getComputationDataFromFixture} from './MetricTestUtils.js';

const {FirstContentfulPaint} = Lantern.Metrics;

const trace = readJson('../../../fixtures/artifacts/progressive-app/trace.json', import.meta);
const trace = readJson('../../../test/fixtures/artifacts/progressive-app/trace.json', import.meta);

describe('Metrics: Lantern FCP', () => {
it('should compute predicted value', async () => {
Expand Down
4 changes: 2 additions & 2 deletions core/lib/lantern/metrics/Interactive.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {readJson} from '../../../test/test-utils.js';

const {Interactive, FirstContentfulPaint, LargestContentfulPaint} = Lantern.Metrics;

const trace = readJson('../../../fixtures/artifacts/progressive-app/trace.json', import.meta);
const iframeTrace = readJson('../../../fixtures/artifacts/iframe/trace.json', import.meta);
const trace = readJson('../../../test/fixtures/artifacts/progressive-app/trace.json', import.meta);
const iframeTrace = readJson('../../../test/fixtures/artifacts/iframe/trace.json', import.meta);

describe('Metrics: Lantern TTI', () => {
it('should compute predicted value', async () => {
Expand Down
2 changes: 1 addition & 1 deletion core/lib/lantern/metrics/LargestContentfulPaint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {readJson} from '../../../test/test-utils.js';

const {FirstContentfulPaint, LargestContentfulPaint} = Lantern.Metrics;

const trace = readJson('../../../fixtures/artifacts/paul/trace.json', import.meta);
const trace = readJson('../../../test/fixtures/artifacts/paul/trace.json', import.meta);

describe('Metrics: Lantern LCP', () => {
it('should compute predicted value', async () => {
Expand Down
2 changes: 1 addition & 1 deletion core/lib/lantern/metrics/SpeedIndex.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {getComputationDataFromFixture} from './MetricTestUtils.js';

const {SpeedIndex, FirstContentfulPaint} = Lantern.Metrics;

const trace = readJson('../../../fixtures/artifacts/progressive-app/trace.json', import.meta);
const trace = readJson('../../../test/fixtures/artifacts/progressive-app/trace.json', import.meta);

const defaultThrottling = Lantern.Simulation.Constants.throttling.mobileSlow4G;

Expand Down
4 changes: 2 additions & 2 deletions core/lib/lantern/simulation/NetworkAnalyzer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {runTraceEngine} from '../metrics/MetricTestUtils.js';

const {NetworkAnalyzer} = Lantern.Simulation;

const trace = readJson('../../../fixtures/artifacts/paul/trace.json', import.meta);
const traceWithRedirect = readJson('../../../fixtures/artifacts/redirect/trace.json', import.meta);
const trace = readJson('../../../test/fixtures/artifacts/paul/trace.json', import.meta);
const traceWithRedirect = readJson('../../../test/fixtures/artifacts/redirect/trace.json', import.meta);

/**
* @param {Lantern.Trace} trace
Expand Down
4 changes: 2 additions & 2 deletions core/lib/lantern/simulation/Simulator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import assert from 'assert/strict';

import * as Lantern from '../lantern.js';
import {readJson} from '../../../test/test-utils.js';
import {runTraceEngine} from '../../../test/lib/lantern/metrics/MetricTestUtils.js';
import {runTraceEngine} from '../metrics/MetricTestUtils.js';

const {NetworkNode, CPUNode} = Lantern;
const {Simulator, DNSCache} = Lantern.Simulation;

const pwaTrace = readJson('../../../fixtures/artifacts/progressive-app/trace.json', import.meta);
const pwaTrace = readJson('../../../test/fixtures/artifacts/progressive-app/trace.json', import.meta);

let nextRequestId = 1;
let nextTid = 1;
Expand Down
2 changes: 1 addition & 1 deletion core/test/scripts/run-mocha-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ const defaultTestMatches = [
'cli/**/*-test.js',
'core/**/*-test.js',
'core/test/**/*-test-pptr.js',
'core/lib/lantern/*.test.js',
'core/lib/lantern/**/*.test.js',
'report/**/*-test.js',
'shared/**/*-test.js',
'third-party/**/*-test.js',
Expand Down
Loading