I'm a fan of Open Source and have a growing interest in serverless and edge computing. I'm not a big fan of spiders, but they're doing good work eating bugs. I also stream on Twitch.
You would still need to import axe, but that's it, i.e.
import{axe}from'jest-axe';
And in your test, things would stay the same. i.e.
test('should have no accessiblity violations',async()=>{const{container}=render(<App/>);constresults=awaitaxe(container);expect(results).toHaveNoViolations();});
It's a small change, but it saves importing it in every file that requires a11y checks.
Looking forward to your next post!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You would still need to import
axe
, but that's it, i.e.And in your test, things would stay the same. i.e.
It's a small change, but it saves importing it in every file that requires a11y checks.
Looking forward to your next post!