Skip to content

tests: move readJson from root.js to test-utils.js #14175

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

Merged
merged 1 commit into from
Jun 30, 2022
Merged

Conversation

connorjclark
Copy link
Collaborator

While converting core to ESM I came across a footgun where I used readJson inside core/, resulting in the bundled Lighthouse code being wrong (because we don't inline those calls). This large refactor is very simple: move readJson from root.js to test-utils.js, and update 70+ imports 👀

This is intended to make it very obvious that this function should not be used outside tests or scripts.

@connorjclark connorjclark requested a review from adamraine June 30, 2022 01:31
@connorjclark connorjclark requested a review from a team as a code owner June 30, 2022 01:31
Copy link
Member

@adamraine adamraine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@connorjclark connorjclark changed the title test: move readJson from root.js to test-utils.js tests: move readJson from root.js to test-utils.js Jun 30, 2022
@connorjclark connorjclark merged commit 6680d23 into master Jun 30, 2022
@connorjclark connorjclark deleted the readJson-move branch June 30, 2022 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants