react-testing-library

🐐 Simple and complete React DOM testing utilities that encourage good testing practices. [Moved to: https://github.com/testing-library/react-testing-library] (by kentcdodds)

React-testing-library Alternatives

Similar projects and alternatives to react-testing-library based on common topics and language

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better react-testing-library alternative or higher similarity.

react-testing-library reviews and mentions

Posts with mentions or reviews of react-testing-library. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-05-15.
  • fireEvent not properly calling event in react-testing-library
    2 projects | /r/codehunter | 15 May 2022
    I'm currently testing an input using Jest & react-testing-library. I'm trying to test whether the onChange function fires whenever my input's field changes. Here's an example of my code:
  • React testing library on change for Material UI Select component
    1 project | /r/codehunter | 26 Mar 2022
    I am trying to test the onChange event of a Select component using react-testing-library.
  • How to query by text string which contains html tags using React Testing Library?
    1 project | /r/codehunter | 18 Mar 2022
    Reactjs Current Working Solution Using this html: Name: Bob (special guest) I can use the React Testing Library getByTestId method to find the textContent: expect(getByTestId('foo').textContent).toEqual('Name: Bob (special guest)') Is there a better way? I would like to simply use this html: Name: Bob (special guest) And use React Testing Library's getByText method like this: expect(getByText('Name: Bob (special guest)')).toBeTruthy() But this does not work. So, the question… Is there a simpler way to use React Testing Library to find strings of text content with the tags striped out? Answer link : https://codehunter.cc/a/reactjs/how-to-query-by-text-string-which-contains-html-tags-using-react-testing-library
  • TypeError: scrollIntoView is not a function
    1 project | /r/codehunter | 17 Mar 2022
    I am new to react-testing-library / jest and attempting to write a test to see if the navigation of routes (using react-router-dom) is performed correctly. So far I have been following the README and this tutorial on how to use.
  • Find element by id in react-testing-library
    1 project | /r/codehunter | 15 Mar 2022
    I'm using react-testing-libarary to test my react application. For some reason, I need to be able to find the element by id and not data-testid. There is no way to achieve this in the documentation.
  • A note from our sponsor - WorkOS
    workos.com | 28 Apr 2024
    The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning. Learn more →

Stats

Basic react-testing-library repo stats
5
16,049
6.0
about 2 years ago

kentcdodds/react-testing-library is an open source project licensed under MIT License which is an OSI approved license.

The primary programming language of react-testing-library is JavaScript.


Sponsored
Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com