jest-dom
:owl: Custom jest matchers to test the state of the DOM (by testing-library)
jest-axe
Custom Jest matcher for aXe for testing accessibility ♿️🃏 (by NickColley)
Our great sponsors
jest-dom | jest-axe | |
---|---|---|
22 | 4 | |
4,270 | 1,040 | |
1.2% | - | |
7.1 | 4.3 | |
4 days ago | 6 months ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
jest-dom
Posts with mentions or reviews of jest-dom.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-12-15.
-
Mastering Jest Configuration for React TypeScript Projects with Vite: A Step-by-Step Guide
//config/jest/setupTests.ts // jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom';
-
Anyone have setup instructions for Vitest + Typescript + React testing library? My setup is failing to extend matchers on Vitest Types
Update: Just got it working. Following the instructions on this github issue and using `shamefully-hoist=true` with pnpm I got it working. The issue I was facing was with pnpm.
-
Setting Up a Modern Preact Application With Typescript, Vite and Vitest
vitest-dom extends the standard Jest matchers with convenient methods like .toBeDisabled. Now you can write tests that assert on the state of the DOM. The package is a fork of @testing-library/jest-dom.
-
Superset: Testing and Enzyme to RTL conversion
jest-dom matchers
-
Migrating from Jest to Vitest
At the time of writing this article, it still seems to be an open issue. However, a workaround I found is to add "skipLibCheck": true, to your tsconfig.json file.
- Buenas prácticas con Angular Testing Library
-
Unable to test React-Redux Toolkit app
// jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom'; import { server } from './mocks/server'; beforeAll( () => server.listen( { onUnhandledRequest: 'error' } ) ); afterEach( () => server.resetHandlers() ); afterAll( () => server.close() );
-
Setup Jest to React Typescript Vite project, also SWC (part 1)
Everything you want to do to your test environment such as extends the jest matchers with @testing-library/jest-dom, mock some APIs that’s not implemented in jdom, you can put to config/jest/setupTests.js:
-
Build your own component library with Svelte
We will also use an additional plugin with Testing Library called user-event, which allows us to mimic user events, like typing inside an input or clicking on a button. We will also use a plugin called jest-dom, which extends the DOM-related matching capabilities of Jest, which we require because we are dealing with web components.
jest-axe
Posts with mentions or reviews of jest-axe.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-09-05.
-
Xbox’s Matt Booty ‘dreams’ of having AI as QA testers
I usually use a combination of Storybook + Chromatic, Cypress, and Jest + Testing Library + jest-axe. Fairly standard, I think? (Aside from Chromatic, but that's mainly for convenience)
-
Study Notes for Kent C. Dodds' Javascript Testing Course
How to test accessibility issues? Use Jest-axe GitHub - nickcolley/jest-axe: Custom Jest matcher for aXe for testing accessibility ♿️🃏
-
Automated Accessibility Testing Is a Good Start - But You Need To Test Manually Too
Tests are another place where plugins can bring more accessibility insights. I've used two, depending on the test setup: jest-axe and cypress-axe. They both add axe-core, Deque's testing solution to the testing environment.
What are some alternatives?
When comparing jest-dom and jest-axe you can also consider the following projects:
jest - Delightful JavaScript Testing.
msw - Seamless REST/GraphQL API mocking library for browser and Node.js.
eslint-plugin-jsx-a11y - Static AST checker for a11y rules on JSX elements.
Cypress - Fast, easy and reliable testing for anything that runs in a browser.
user-event - 🐕 Simulate user events
test-data-bot
jest-cheat-sheet - Jest cheat sheet
husky - Git hooks made easy 🐶 woof!
lighthouse - Automated auditing, performance metrics, and best practices for the web.
jest-in-case - Jest utility for creating variations of the same test