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

docs: fix results-api.mdx getResults script #6021

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jsberlanga
Copy link

Summary

This pull request addresses two typos in the getResults scripts for the Results API. These typos are causing errors in the pipeline during execution.

Errors Resolved

1. console.log misplacement:

The console.log statement was incorrectly written as .console.log, leading to the following error:

/builds/acme/acme-app/packages/ui/scripts/verifyAccessibilityResults.js:13
    .console.log(`See full report at ${accessibilityReportUrl}.`);
    ^
TypeError: Cannot read properties of undefined (reading 'console')
    at /builds/acme/acme-app/packages/ui/scripts/verifyAccessibilityResults.js:13:5
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

2. rulesWithExistingViolations Initialization Issue.

The variable rulesWithExistingViolations was being used before it was initialized, resulting in:

/builds/acme/acme-app/packages/ui/scripts/verifyAccessibilityResults.js:29
    return !rulesWithExistingViolations.includes(rule.name);
    ^
ReferenceError: Cannot access 'rulesWithExistingViolations' before initialization
    at /builds/acme/acme-app/packages/ui/scripts/verifyAccessibilityResults.js:29:5
    at Array.filter (<anonymous>)
    at /builds/acme/acme-app/packages/ui/scripts/verifyAccessibilityResults.js:28:35
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Copy link

netlify bot commented Nov 29, 2024

👷 Deploy request for cypress-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 0dca969

@CLAassistant
Copy link

CLAassistant commented Nov 29, 2024

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link
Collaborator

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Nov 29, 2024

@jsberlanga

Good catch!

Would you like to run the following to fix the formatting so that prettier is happy?

npm run lint:fix

@jsberlanga
Copy link
Author

Thanks @MikeMcC399 I've run lint:fix

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.

4 participants