ackama / lighthouse-matchers

Provides RSpec matchers for executing and evaluating Google Chrome Lighthouse audit scores
MIT License
15 stars 1 forks source link

Print lighthouse run warnings #53

Closed G-Rath closed 3 months ago

G-Rath commented 3 months ago

The results include a runWarnings property which we should probably output, e.g.

  "runWarnings": [
    "The page may not be loading as expected because your test URL (http://127.0.0.1:43117/) was redirected to http://127.0.0.1:43117/users/sign_in. Try testing the second URL directly."
  ],

I've got a basic patch for this already:

    @audit_service.run_warnings.each do |warning|
      RSpec.configuration.reporter.message("#{RSpec.current_example.location}: #{warning}")
    end