-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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(smokehouse): check runWarnings #9732
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.
neat!
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'm not sure if it's super valuable to require that the expectations include the runWarnings
since all these runWarnings
are the same as the also-required runtimeError
because we copy them over, (and we have tests that they're copied over and that gatherRunner LighthouseRunWarnings
always become LHR runWarnings
), but the implementation is small and these are low-churn enough that if you think this will be worthwhile, 👍 👍
To this end I'm about to propose something later today that would immediately eliminate this requirement FYI :) (just in the smokes PR here not globally for LH) |
🎶:ominous_music: 🎶 |
@brendankenny but this warnings array is not just runtime errors, some audits push warnings to this too (actually, just bootup-time, but IIRC there's some outstanding PR that adds another usage). there can only be one runtime error, but many warnings, so I'm not sure the runtimeError catches all the same behavior. |
I was just talking about requiring them, which requires the doubling up of all these messages, totally seems valuable to be able to assert them. |
Add
lhr.runWarnings
to the expectation checker. If not defined, the checker expects nothing to be there (likeruntimeError
).