Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-axe

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-axe

Custom Jest matcher for aXe for testing accessibility

  • 2.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
479K
decreased by-22.78%
Maintainers
1
Weekly downloads
 
Created

What is jest-axe?

jest-axe is a Jest matcher for aXe for testing accessibility. It allows developers to integrate accessibility checks into their Jest test suites, ensuring that their web applications meet accessibility standards.

What are jest-axe's main functionalities?

Accessibility Testing

This feature allows you to test for accessibility violations in your HTML. The code sample demonstrates how to use jest-axe to check if a rendered HTML string has any accessibility violations.

const { axe, toHaveNoViolations } = require('jest-axe');
expect.extend(toHaveNoViolations);

test('should demonstrate this matcher`s usage', async () => {
  const render = () => '<img src="#" alt="test" />';
  const html = render();
  const results = await axe(html);
  expect(results).toHaveNoViolations();
});

Other packages similar to jest-axe

Keywords

FAQs

Package last updated on 03 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc