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

tests(smokehouse): check runWarnings #9732

Merged
merged 3 commits into from Sep 25, 2019
Merged

Conversation

connorjclark
Copy link
Collaborator

@connorjclark connorjclark commented Sep 25, 2019

Add lhr.runWarnings to the expectation checker. If not defined, the checker expects nothing to be there (like runtimeError).

@connorjclark connorjclark changed the title smoke: check runWarnings tests(smokehouse): check runWarnings Sep 25, 2019
Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

neat!

Copy link
Member

@brendankenny brendankenny left a 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, 👍 👍

@patrickhulce
Copy link
Collaborator

patrickhulce commented Sep 25, 2019

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

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)

@brendankenny
Copy link
Member

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: 🎶

@connorjclark
Copy link
Collaborator Author

@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.

@brendankenny
Copy link
Member

@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).

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants