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

Seeing invalid arguments compilation error with HTML Reports "Expected 0 arguments, but got 1." #231

Open
Rahul-Todupunoori opened this issue Oct 17, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Rahul-Todupunoori
Copy link

We are trying to use cypress-audit/lighthouse, and we are trying to setup HTML reports for the lighthouse and see ts compilation errors for the lighthouseReport for invalid arguments.

cypress.config.ts

on('task', {
        lighthouse: lighthouse((lighthouseReport) => {
          writeFile('lighthouse.html', lighthouseReport.report, (error: any) => {
            error ? console.log(error) : console.log('Report created successfully');
          });
        }),
      });
      on('before:browser:launch', (_browser, launchOptions) => {
        prepareAudit(launchOptions);
      });

test code

cy.lighthouse(
      {
        performance: 20,
        accessibility: 100,
        'best-practices': 85,
        seo: 85,
        pwa: 100,
      },
      { disableStorageReset: false },
      {
        settings: { output: 'html' },
        extends: 'lighthouse:default',
      }
    );

Error message:
Screenshot 2023-10-17 at 4 19 47 PM

@Rahul-Todupunoori Rahul-Todupunoori added the bug Something isn't working label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant