Comments (4)
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.
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.
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.
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)
- Light House: Save Trace File after audit HOT 1
- More detailed failure report HOT 1
- Error: Webpack Compilation Error: Module parse failed: Unexpected token (151:33) HOT 2
- Lighthouse check is skipped when we pass chrome binary path in cypress run HOT 1
- cy.pa11y() fails with the following error: The "listener" argument must be of type function. Received undefined
- Cypress Lighthouse test failing after latest Chrome Version Upgrade (Version 111.0.5563.64 ) HOT 30
- Can't install v1.4.1 via npm HOT 1
- Cypress-Audit support for Lighthouse-user-flow
- Unexpected token '||=' HOT 3
- CRA example does not work out of the box: Unexpected token '??=' HOT 1
- pa11y/cypress integration with typescript
- Cypress screenshot error since Chrome 107
- cy.task('lighthouse') failed with the following error: > Unexpected token '??=' HOT 2
- VSCode Pa11y and typescript - /node_modules/.pnpm/@[email protected]/node_modules/@cypress-audit/pa11y/index.d.ts' is not a module HOT 1
- Seeing invalid arguments compilation error with HTML Reports "Expected 0 arguments, but got 1."
- This plugin doesn't work with Cypress version >= 13
- When cy.lighthouse() command is run, Cypress opens a new browser tab HOT 2
- Typescript: compilation error when using plugin with and Cypress >= 13.5.1 (no exported member BrowserLaunchOptions)
- 3rd party authentication scenario: lighthouse runs the login page on a separate new tab
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress-audit.