enzyme-chai-a11y
v0.0.9
Published
Accessibility testing plugin for chai based on axe-core
Downloads
2
Keywords
Readme
enzyme-chai-a11y
Accessibility testing plugin for chai based on axe-core
Install
npm:
npm i enzyme-chai-a11y --save-dev
Yarn:
yarn add enzyme-chai-a11y --dev
Usage
import auditA11y, { accessible } from "enzyme-chai-a11y";
chai.use(accessible);
it('should not have accessibility violations', async () => {
const results = await auditA11y(<p>test</p>);
expect(results).to.be.accessible();
});
API
Table of Contents
auditA11y
Runs the axe-core on passed component.
Parameters
app
node node to testconfig
object axe-core config (optional, default{}
)enzymeConfig
object enzyme config (optional, default{}
)
License
MIT © Vikas Parashar