New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jest-axe

Package Overview
Dependencies
Maintainers
1
Versions
27
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

10.0.0
latest
Source
npm
Version published
Weekly downloads
679K
0.01%
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

jest

FAQs

Package last updated on 03 Mar 2025

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