Giter Club home page Giter Club logo

Comments (4)

armancodv avatar armancodv commented on June 12, 2024 3

RESOLVED

This PR, #221 , has made updates to the documentation for report generation. To implement the changes, please use the code snippet provided below:

const thresholds = {
  /* ... */
};

const lighthouseOptions = {
  /* ... your lighthouse options */
};

const lighthouseConfig = {
  settings: { output: "html" },
  extends: "lighthouse:default",
  /* ... Alternatively, you could set your own lighthouse config */
};

cy.lighthouse(thresholds, lighthouseOptions, lighthouseConfig);

Link to updated Doc: https://github.com/mfrachet/cypress-audit/blob/master/packages/documentation/docs/guides/lighthouse/reports.md

I suggest updating this page as well: https://mfrachet.github.io/cypress-audit/guides/lighthouse/reports.html#generating-html-reports

PS: I can confirm @hernikplays 's solution also works.

from cypress-audit.

hernikplays avatar hernikplays commented on June 12, 2024

I had this same problem, I had

 config: {
  output: 'html'
}

in my cypress.config.js and when I changed config key to options, it started to work.

options: {
   output: 'html'
}

from cypress-audit.

asmahler avatar asmahler commented on June 12, 2024

I'm also having this same issue as well. I tried even passing the args for lighthouse for the output and no luck.

from cypress-audit.

mark0203 avatar mark0203 commented on June 12, 2024

If I would only check the issues section sooner. Just wasted a couple of days trying to figure out what I'm doing wrong.
This fixed it for me

const lighthouseConfig = {
settings: { output: "html" },
extends: "lighthouse:default",

I also like to add that I also had to replace (error : any) with (error) in fs.writeFile("lighthouse.html", lighthouseReport.report, (error) => {

from cypress-audit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.