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: print run warnings from Lighthouse #55

Merged
merged 4 commits into from
Jul 5, 2024
Merged

Conversation

G-Rath
Copy link
Contributor

@G-Rath G-Rath commented Jun 27, 2024

I've not added any tests for the matcher itself because this is calling real RSpec code so the warnings get actually printed and I'm not sure how safe it is to try and spy or mock anything from RSpec - I couldn't actually find a lot of guidance on this so very open to thoughts from those with more custom-matcher and gem experiences 😄

I have also for now chosen to assume runWarnings always exists since it will be very easy to switch to a fetch later if needed and this way we should end up hearing e.g. if this property gets renamed.

This is an example of the output:

./spec/system/home_feature_spec.rb:26: [lighthouse] The page may not be loading as expected because your test URL (http://127.0.0.1:35403/) was redirected to http://127.0.0.1:35403/users/sign_in. Try testing the second URL directly.

Resolves #53

@G-Rath
Copy link
Contributor Author

G-Rath commented Jun 27, 2024

(while this is ready for review, I will cherry-pick it + a few other PRs onto a dedicated branch so I can test them on a few private apps before we actually merge and release anything)

@G-Rath G-Rath requested a review from joshmcarthur July 2, 2024 22:29
@G-Rath G-Rath merged commit 899c04f into main Jul 5, 2024
10 checks passed
@G-Rath G-Rath deleted the print-run-warnings branch July 5, 2024 21:26
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.

Print lighthouse run warnings
2 participants