OSS TanbouSign in with GitHub

test UI with DOM queries that resemble how users find elements

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
3,335
Primary language
JavaScript
License
MIT
Repository last updated
Sep 15, 2026
On this page

Overview

DOM Testing Library is a lightweight set of utilities for testing DOM nodes. Instead of relying on component instances or implementation details, it encourages queries that resemble how users find elements on the page, making UI tests more resilient to refactoring.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Test DOM nodes in JSDOM or a browser environment

The library works with DOM nodes rather than framework-specific component instances and focuses assertions on user-visible UI.

Sources: [1]

Provide the user-centric foundation used by framework wrappers

React, Vue, Angular, and other wrappers build on the same DOM-oriented testing principles while adding framework integration.

Sources: [1]

Best fit

Fits UI tests that should verify behavior instead of implementation details

It is useful when tests should survive internal component refactors as long as the visible behavior remains the same.

Sources: [1]

Before adoption

The v10.4.2 package metadata requires Node.js 18 or newer

Check the selected test runner, JSDOM version, and surrounding toolchain against the target Node.js runtime before adoption.

Sources: [2]

Official sources

  1. [1]DOM Testing Library v10.4.2 README(2026-10-06)
  2. [2]DOM Testing Library v10.4.2 package metadata(2026-10-06)
  3. [3]DOM Testing Library v10.4.2 release(2026-10-06)
Supplemental curator note

DOM Testing Library fits UI tests that should remain stable when internal component implementation changes but user-visible behavior does not. The v10.4.2 package metadata requires Node.js 18 or newer.

Try it in 3 steps

  1. 1

    Get the source

    git clone --depth 1 https://github.com/testing-library/dom-testing-library.git
  2. 2

    Enter the repository

    cd dom-testing-library
  3. 3

    Check the official steps

    Continue with the commands in the README Installation, Quick Start, or Getting Started section.

    find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Check the official README

Growth

Growth trends · Last 30 days

3,335 Stars

Trend data is still being collected.

Built with

Categories and tags

Categories

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • javascript
  • testing
Stars
3,335
Forks
473
Watchers
30
Open issues
132
Owner type
Organization
Primary language
JavaScript
License
MIT
Repository last updated
Sep 15, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?