该项目是一个专门的测试工具和 Mock 实用程序,旨在隔离测试 React Hook。它提供了一个模拟组件环境,用于执行 Hook 逻辑并跟踪返回的值,而无需完整的用户界面。
testing-library/react-hooks-testing-library 的主要功能包括: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。
testing-library/react-hooks-testing-library 的开源替代品包括: 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…
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
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
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
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