awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
kentcdodds avatar

kentcdodds/react-testing-library

0
View on GitHub↗
19,606 星标·1,165 分支·JavaScript·MIT·11 次浏览testing-library.com/react↗

React Testing Library

This project is a component testing framework and utility designed for testing React components. It functions as a DOM testing library that allows for the verification of rendered output and component functionality without accessing internal implementation details.

The library focuses on behavior driven development by simulating user interactions within a virtual DOM environment. It utilizes implementation-agnostic querying to locate elements via accessible roles and labels, ensuring that the interface is verified from the perspective of the user.

The toolset covers frontend integration testing and React DOM validation. It provides capabilities to render components into a simulated browser document, trigger synthetic events, and verify that the resulting HTML output behaves correctly.

Features

  • Implementation-Agnostic Querying - Locates elements using accessible roles and labels instead of internal component state or CSS classes.
  • Node.js DOM Implementations - Uses a JavaScript implementation of the DOM to run browser-like tests within a Node.js process.
  • User Interaction Simulation - Trigger user events on rendered elements to verify the interface behaves correctly from the user's perspective.
  • DOM Simulation Rendering - Renders React components into a simulated browser document to verify actual HTML output.
  • DOM Testing Utilities - Provides utilities for querying and interacting with the DOM to verify accessibility and behavior.
  • DOM Validation - Checks that the correct HTML elements and text are rendered in response to specific application states.
  • Component Testing Frameworks - Provides a framework to render components and simulate interactions to verify functionality.
  • React Testing Utilities - Offers specialized helpers for rendering, querying, and interacting with React components during tests.
  • Testing Utilities - Verifies that React user interface components behave correctly by simulating real user interactions.
  • Event-Driven Interaction Handlers - Triggers synthetic DOM events to mimic real user behavior and verify interface changes.
  • Frontend Integration Testing - Validates how different React components interact and maintain accessibility compliance within a controlled environment.
  • Behavior-Driven Testing - Focuses tests on user-visible outcomes rather than internal implementation details.
  • 测试框架 - Simple and complete React DOM testing utilities that encourage good testing practices.

Star 历史

kentcdodds/react-testing-library 的 Star 历史图表kentcdodds/react-testing-library 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

常见问题解答

kentcdodds/react-testing-library 是做什么的?

This project is a component testing framework and utility designed for testing React components. It functions as a DOM testing library that allows for the verification of rendered output and component functionality without accessing internal implementation details.

kentcdodds/react-testing-library 的主要功能有哪些?

kentcdodds/react-testing-library 的主要功能包括:Implementation-Agnostic Querying, Node.js DOM Implementations, User Interaction Simulation, DOM Simulation Rendering, DOM Testing Utilities, DOM Validation, Component Testing Frameworks, React Testing Utilities。

kentcdodds/react-testing-library 有哪些开源替代品?

kentcdodds/react-testing-library 的开源替代品包括: testing-library/react-testing-library — React Testing Library is a testing framework for verifying React components by interacting with rendered output… enzymejs/enzyme — Enzyme is a testing utility for React components designed to verify their output and behavior in a test environment.… microsoft/playwright — Playwright is a comprehensive browser automation framework designed for end-to-end testing and web workflow… facebook/react — React is a JavaScript library for building user interfaces based on a component-driven architecture and unidirectional… flutter-team-archive/plugins — This project is a collection of official plugin packages and a native integration library designed to provide a… tmpvar/jsdom — jsdom is a Node.js implementation of web standards that functions as a headless browser emulator. It provides a…

React Testing Library 的开源替代方案

相似的开源项目,按与 React Testing Library 的功能重合度排序。
  • testing-library/react-testing-librarytesting-library 的头像

    testing-library/react-testing-library

    19,606在 GitHub 上查看↗

    React Testing Library is a testing framework for verifying React components by interacting with rendered output instead of internal implementation details. It functions as a DOM testing utility and a frontend integration testing tool that mounts components into a virtual document object model for execution within Node.js environments. The library utilizes an accessibility-first query engine to locate user interface elements via ARIA roles and labels. This approach ensures web accessibility standards are met by mirroring how users perceive the interface rather than relying on implementation-sp

    JavaScriptjavascriptreactjstesting
    在 GitHub 上查看↗19,606
  • enzymejs/enzymeE

    enzymejs/enzyme

    19,831在 GitHub 上查看↗

    Enzyme is a testing utility for React components designed to verify their output and behavior in a test environment. It serves as a test harness for UI components, providing tools to render visual elements, manage state transitions, and simulate synthetic events. The library distinguishes itself through multiple rendering modes, including a shallow rendering engine for isolated unit testing and full DOM rendering for testing deep integration. It employs an adapter-based integration system to maintain compatibility across different versions of the underlying framework. The toolkit covers a br

    JavaScript
    在 GitHub 上查看↗19,831
  • microsoft/playwrightmicrosoft 的头像

    microsoft/playwright

    91,074在 GitHub 上查看↗

    Playwright is a comprehensive browser automation framework designed for end-to-end testing and web workflow automation. It provides a unified API to drive web applications across multiple browser engines, enabling developers to simulate complex user interactions, perform web scraping, and validate application behavior in consistent, isolated environments. The framework distinguishes itself through a web-first testing paradigm that prioritizes stability and resilience. By utilizing an auto-waiting actionability engine and accessibility-tree-based locators, it eliminates common sources of test

    TypeScriptautomationchromechromium
    在 GitHub 上查看↗91,074
  • facebook/reactfacebook 的头像

    facebook/react

    245,669在 GitHub 上查看↗

    React is a JavaScript library for building user interfaces based on a component-driven architecture and unidirectional data flow.

    JavaScriptjavascriptuifrontend
    在 GitHub 上查看↗245,669
  • 查看 React Testing Library 的所有 30 个替代方案→