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

feat: Lighthouse stringify extension #272

Merged
merged 7 commits into from
Aug 23, 2022
Merged

feat: Lighthouse stringify extension #272

merged 7 commits into from
Aug 23, 2022

Conversation

adamraine
Copy link
Collaborator

Should be pretty much the same as GoogleChrome/lighthouse#14146

FWIW I think some version of the e2e tester could be useful for the more generic PuppeteerStringifyExtension. The e2e tester is what helped me catch the bug from #261.

@@ -56,6 +56,7 @@
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-tsdoc": "0.2.16",
"lighthouse": "9.5.0-dev.20220818",
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The output scripts require features in LH 10.0. This dep is only used for testing so it should be fine to use a preview build.

@OrKoN OrKoN self-requested a review August 23, 2022 06:25
extension: new LighthouseStringifyExtension(),
});

// Trim the output to the relevant stuff
Copy link
Collaborator

Choose a reason for hiding this comment

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

should we extract a helper function for trimming? Also, perhaps, it's better to search for await browser.close() to avoid the dangling await in the snapshot?

assert.strictEqual(stdout, '');
assert.strictEqual(stderr, '');

const reportHtml = fs.readFileSync(
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is nice! we need to do that for the regular stringify extension and combine it with #268 to have better coverage

@OrKoN OrKoN merged commit 4ce0267 into main Aug 23, 2022
@OrKoN OrKoN deleted the lighthouse-stringify branch August 23, 2022 07:08
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.

None yet

2 participants