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

How to ignore certain rules for certain tests #638

Open
alexvuong opened this issue Feb 1, 2024 · 0 comments
Open

How to ignore certain rules for certain tests #638

alexvuong opened this issue Feb 1, 2024 · 0 comments

Comments

@alexvuong
Copy link

alexvuong commented Feb 1, 2024

Hi,
I am wondering if we can turn off some certain rules for specific tests. For example, there are some accessibility errors happening due to the third-party usage. It is out of our control to fix those errors. We want to skip that check if it is possible

 expect(1 issues)toBeAccessible: expected document to have no accessibility violations but found 1 issues:

     "⭕ (aria-allowed-attr) Elements must only use allowed ARIA attributes: #popover-trigger-\\:rb\\:"
    	🔗 Help URL: https://dequeuniversity.com/rules/axe/4.7/aria-allowed-attr
    	🔗 WCAG Criteria: SA11Y-WCAG-SC4.1.2-P1(0 issues)

      130 |     })
      131 |     // To test using all rules provided by axe
    > 132 |     await expect(container).toBeAccessible(full)
          |                             ^
      133 | })
      134 |
      135 | /**

Something like jest-axe config? https://www.npmjs.com/package/jest-axe#setting-global-configuration

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

No branches or pull requests

1 participant