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: use relative path in utils test files #737

Merged
merged 1 commit into from
Jul 18, 2022
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
6 changes: 3 additions & 3 deletions packages/utils/test/assertions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

/* eslint-env jest */

const lighthouseAllPreset = require('@lhci/utils/src/presets/all.js');
const {convertBudgetsToAssertions} = require('@lhci/utils/src/budgets-converter.js');
const {getAllAssertionResults} = require('@lhci/utils/src/assertions.js');
const lighthouseAllPreset = require('../src/presets/all.js');
const {convertBudgetsToAssertions} = require('../src/budgets-converter.js');
const {getAllAssertionResults} = require('../src/assertions.js');

describe('getAllAssertionResults', () => {
let lhrs;
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/test/audit-diff-finder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const {
synthesizeItemKeyDiffs,
sortZippedBaseAndCompareItems,
replaceNondeterministicStrings,
} = require('@lhci/utils/src/audit-diff-finder.js');
} = require('../src/audit-diff-finder.js');

describe('#findAuditDiffs', () => {
it('should return empty array for identical audits', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/test/budgets-converter.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
const {
convertPathExpressionToRegExp,
convertBudgetsToAssertions,
} = require('@lhci/utils/src/budgets-converter.js');
} = require('../src/budgets-converter.js');

describe('convertPathExpressionToRegExp', () => {
const pathMatch = (path, pattern) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/test/saved-reports.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
const fs = require('fs');
const path = require('path');
const {withTmpDir} = require('../../cli/test/test-utils.js');
const {replaceUrlPatterns, saveLHR} = require('@lhci/utils/src/saved-reports.js');
const {replaceUrlPatterns, saveLHR} = require('../src/saved-reports.js');

describe('#replaceUrlPatterns', () => {
it('should replace basic patterns', () => {
Expand Down