-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
docs(integration-tests): using Lighthouse with Jest; verify in our CI #9722
Conversation
Co-Authored-By: Shane Exterkamp <[email protected]>
Co-Authored-By: Patrick Hulce <[email protected]>
Co-Authored-By: Brendan Kenny <[email protected]>
"test": "jest example-lh-auth.test.js" | ||
}, | ||
"dependencies": { | ||
"jest": "^24.9.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also tried to just use ../../../node_modules/.bin/jest
, but we are some versions behind and are missing this.utils.DIM_COLOR
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this PR does two things
- docs example of using jest with LH & pptr
- validates that jest example works in CI
should call that out in the title or description.
nits here and there.
* @return {Promise<LH.Result>} | ||
*/ | ||
async function runLighthouse(url) { | ||
const result = await lighthouse(url, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt this also be the impl in example-lh-auth.js ?
that way this file is just tests and no extra stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is short and very relevant to running Lighthouse in tests, so I think it should be here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
k sg
Co-Authored-By: Paul Irish <[email protected]>
… into integration-docs
split out from #9628