awesome-repositories.com
Blog
awesome-repositories.com

Descubre los mejores repositorios open-source con nuestra búsqueda potenciada por IA.

ExplorarBúsquedas curadasAlternativas open-sourceSoftware autohospedableBlogMapa del sitio
ProyectoAcerca deCómo clasificamosPrensaServidor MCP
Aviso legalPrivacidadTérminos
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
testing-library avatar

testing-library/react-hooks-testing-library

0
View on GitHub↗
5,266 estrellas·230 forks·TypeScript·MIT·13 vistasreact-hooks-testing-library.com↗

React Hooks Testing Library

Este proyecto es un banco de pruebas especializado y utilidad de mocking diseñada para realizar pruebas unitarias de hooks de React de forma aislada. Proporciona un entorno de componentes simulado que ejecuta la lógica del hook y rastrea los valores devueltos sin requerir una interfaz de usuario completa.

La biblioteca permite la verificación de los ciclos de vida de los hooks, incluyendo las fases de montaje, actualización y desmontaje. Cuenta con mecanismos para inyectar propiedades para forzar re-renderizados y un sistema de espera asíncrono para asegurar que las actualizaciones de estado se procesen antes de ejecutar las aserciones.

El conjunto de herramientas cubre la verificación de la gestión de estado, limpieza automatizada del ciclo de vida para prevenir fugas de estado entre pruebas y la capacidad de activar actualizaciones de estado para verificar cómo responden los hooks a entradas cambiantes.

Features

  • Hook Execution Wrappers - Executes hooks inside a minimal React component to simulate a real lifecycle and access hook state.
  • Custom Hook Testing - Implements a specialized harness for verifying the state transitions and return values of custom hooks in isolation.
  • Hook Return Value Tracking - Captures and tracks the latest return values of hooks during render cycles for external inspection.
  • Hook Mocking Utilities - Provides a framework for injecting props and awaiting asynchronous updates within a simulated React environment.
  • Test Harnesses - Implements a simulated environment (test harness) to validate hook logic without a full UI.
  • Headless Render Cycle Controllers - Manages the timing of hook execution and state updates to ensure predictable behavior in headless environments.
  • Asynchronous Polling Mechanisms - Provides polling mechanisms to wait for asynchronous state updates before running test assertions.
  • Asynchronous Test Handling - Provides capabilities for managing tests that rely on asynchronous hook operations and promise resolutions.
  • React Testing Utilities - Provides specialized utilities for unit testing React hooks in isolation by simulating a component environment.
  • Component Prop Injection - Allows injecting dynamic properties into a wrapper component to trigger hook re-renders and test various inputs.
  • Hook Property Injection - Passes custom arguments and initial values to hooks to verify behavior across different configurations.
  • State Update Triggering - Provides capabilities to simulate user interactions and state changes to verify that hook return values update correctly.
  • Hook Lifecycle Testing - Ensures that effects and cleanup functions within a hook execute correctly across all lifecycle phases.
  • Test State Cleanup - Includes mechanisms to clear hook state and unmount components to prevent pollution between tests.
  • Test Lifecycle Hooks - Provides mechanisms to unmount test components to trigger cleanup effects and hydrate for interaction.
  • Test Lifecycle Hooks - Automatically executes cleanup functions after tests to remove rendered hooks and prevent state leakage.
  • Hook State Verifications - Verifies that a hook correctly manages internal state and updates its output based on changing triggers.
  • State Response Testers - Utilities for verifying how hooks respond to state changes by triggering re-renders and managing cleanup.
  • Test-Controlled State Updates - Executes state updates and effects within a wrapper to ensure all changes finish before assertions.

Historial de estrellas

Gráfico del historial de estrellas de testing-library/react-hooks-testing-libraryGráfico del historial de estrellas de testing-library/react-hooks-testing-library

Búsqueda con IA

Explora más repositorios increíbles

Describe lo que necesitas en lenguaje sencillo: la IA clasifica miles de proyectos open-source curados por relevancia.

Start searching with AI

Alternativas open-source a React Hooks Testing Library

Proyectos open-source similares, clasificados según cuántas características comparten con React Hooks Testing Library.
  • callstack/react-native-testing-libraryAvatar de callstack

    callstack/react-native-testing-library

    3,390Ver en GitHub↗

    This project is a testing framework designed for React Native applications, providing a suite of tools to render components in a controlled memory environment. It enables developers to verify the behavior and structure of mobile interfaces by simulating user interactions and monitoring component lifecycle transitions. By isolating components from the rest of the application, it ensures that tests remain stable and independent. The framework distinguishes itself through an accessibility-first approach, prioritizing user-facing attributes like roles, labels, and text content when querying the c

    TypeScriptjestreactreact-native
    Ver en GitHub↗3,390
  • avajs/avaAvatar de avajs

    avajs/ava

    20,849Ver en GitHub↗

    Ava is a test runner for JavaScript and TypeScript designed to execute test suites with a focus on concurrency and isolation. It serves as a concurrent test executor that runs test files in parallel across multiple processes to reduce total runtime and prevent state leakage between suites. The project features a built-in snapshot testing framework that saves large data structures to disk and compares subsequent executions to detect regressions via diffs. It is also compatible with the Test Anything Protocol, allowing it to export results for use with external reporting tools. Its capability

    JavaScriptassertasyncasync-functions
    Ver en GitHub↗20,849
  • thomhurst/tunitAvatar de thomhurst

    thomhurst/TUnit

    3,744Ver en GitHub↗

    TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source generation for test discovery and mock creation, ensuring compatibility with Native AOT and IL trimming by eliminating the need for runtime reflection and proxies. The framework provides specialized capabilities for integration testing, including the management of distributed application lifecycles, isolated database schemas, and the correlation of telemetry and logs across process boundaries via OTLP. It also includes an HTTP testing utility to intercept network exchanges and mock AP

    C#csharpdotnettest
    Ver en GitHub↗3,744
  • onsi/ginkgoAvatar de onsi

    onsi/ginkgo

    9,014Ver en GitHub↗

    Ginkgo is a behavior-driven development testing framework, assertion library, and test runner for Go. It provides a domain-specific language for writing human-readable specifications, organizing tests into hierarchical containers and subjects to describe system behavior. The project distinguishes itself through advanced execution control and observability, featuring a test runner capable of parallel distribution, sharding, and randomized execution order to detect flaky tests. It includes specialized diagnostic tools for goroutine leak detection, hanging spec monitoring, and failure state debu

    Go
    Ver en GitHub↗9,014
Ver las 30 alternativas a React Hooks Testing Library→

Preguntas frecuentes

¿Qué hace testing-library/react-hooks-testing-library?

Este proyecto es un banco de pruebas especializado y utilidad de mocking diseñada para realizar pruebas unitarias de hooks de React de forma aislada. Proporciona un entorno de componentes simulado que ejecuta la lógica del hook y rastrea los valores devueltos sin requerir una interfaz de usuario completa.

¿Cuáles son las características principales de testing-library/react-hooks-testing-library?

Las características principales de testing-library/react-hooks-testing-library son: Hook Execution Wrappers, Custom Hook Testing, Hook Return Value Tracking, Hook Mocking Utilities, Test Harnesses, Headless Render Cycle Controllers, Asynchronous Polling Mechanisms, Asynchronous Test Handling.

¿Qué alternativas de código abierto existen para testing-library/react-hooks-testing-library?

Las alternativas de código abierto para testing-library/react-hooks-testing-library incluyen: callstack/react-native-testing-library — This project is a testing framework designed for React Native applications, providing a suite of tools to render… avajs/ava — Ava is a test runner for JavaScript and TypeScript designed to execute test suites with a focus on concurrency and… thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… onsi/ginkgo — Ginkgo is a behavior-driven development testing framework, assertion library, and test runner for Go. It provides a… uber-go/goleak — Goleak is a diagnostic utility designed to identify and report leaked goroutines within Go applications. By… jnicklas/capybara — Capybara is a browser automation testing library and framework for web application acceptance testing. It provides a…