NickColley / jest-axe

Custom Jest matcher for aXe for testing accessibility ♿️🃏
MIT License
1.06k stars 54 forks source link

Adding a configurable error threshold #203

Closed dwightjack closed 2 years ago

dwightjack commented 2 years ago

Hi!

At the moment, the matcher passes only when it detects no violations.

Other tools like pa11y and the next version of cypress-axe allow uses to set a tolerance threshold for the test.

What about adding such a threshold to this matcher as well? If it sounds good to you, I could submit a PR with the related changes.

NickColley commented 2 years ago

I'd recommend instead adding .skip to a specific test or telling axe to ignore a certain rule.