-
Notifications
You must be signed in to change notification settings - Fork 649
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(cli): add --lhr to assert command to load LHRs from anywhere #1024
Conversation
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.
nice
// If we have a budgets file, convert it to our assertions format. | ||
if (budgetsFile) options = await convertBudgetsToAssertions(readBudgets(budgetsFile)); | ||
|
||
const lhrs = loadSavedLHRs().map(json => JSON.parse(json)); | ||
const lhrs = loadSavedLHRs(options.lhr).map(json => JSON.parse(json)); |
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.
it looks like if we pass options.lhr
it will be gone cause it was replaced by the convertBudgetsToAssertions
returned value.
if my understanding is correct & this is a vallid issue, I would love to create PR to fix this
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.
That's absolutely right, nice catch. A PR would be appreciated!
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.
Thanks! fixes coming right up
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.
The fixes are at #1062, @connorjclark.
Could you kindly review it at your convenience?
ref GoogleChrome/lighthouse#15203
Enables usage like this: