jest-dom: Detailed Overview & Metrics

v6.4.6(3 days ago)

This package is actively maintained.Types definitions are bundled with the npm packageNumber of direct dependencies: 8Monthly npm downloads

@testing-library/jest-dom is a companion library for Jest that provides custom Jest matchers for asserting on DOM elements. It enhances the testing experience by offering a set of matchers specifically designed for testing user interfaces and interactions. These matchers allow you to write more expressive and readable tests for your web applications.

Compared to traditional Jest assertions, @testing-library/jest-dom's matchers are more aligned with how users interact with your application, making your tests more robust and closer to real-world scenarios. It promotes best practices for testing accessibility and user experience, ensuring that your application behaves as expected.

Alternatives:
chai-dom+
expect-puppeteer+
jest-enzyme+
cypress+
enzyme+
react-testing-library+
sinon-chai+
mocha+
ava+
qunit-dom+

Tags: testingjestdomuser-interfaceinteractions