@rakoon-badshah/my-newaxe

1.4.7 • Public • Published

Jest Axe package

This is a jest axe package

Installation

npm i -D @rakoon-badshah/my-axe

usage

const {
  toHaveNoViolations,
  axe
} = require('./../axe');

expect.extend(toHaveNoViolations);
it('should demonstrate this matcher`s usage with a default config', async () => {
  const render = () => `
    <div>
      <img src="#"/>
    </div>
  `
  // pass anything that outputs html to axe
  const html = render()

  expect(await axe(html)).toHaveNoViolations()
});

config file - axe.config.json

{
  "runOnly": {
    "type": "tags",
    "values": ["wcag2a", "wcag2aa"]
  },
  "rules": {
    "image-alt": { "enabled": false },
    "region":{ "enabled": false }
  }
}

Readme

Keywords

Package Sidebar

Install

npm i @rakoon-badshah/my-newaxe

Weekly Downloads

0

Version

1.4.7

License

MIT

Unpacked Size

2.86 kB

Total Files

4

Last publish

Collaborators

  • rakoon-badshah