---
title: "Discussion on \"Test Like a User: React Testing Library in One Button\" | Hashnode"
description: "Discussion on \"Test Like a User: React Testing Library in One Button\". What Testing Library is, why getByRole beats class names, and a complete first test with user-event, explained with one Subscribe button."
url: "https://hashnode.com/posts/test-like-a-user-react-testing-library-in-one-button/6b114d951f4da1107735ff43"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Test Like a User: React Testing Library in One Button](https://ravindrarajpoot9454.hashnode.dev/test-like-a-user-react-testing-library-in-one-button?utm_source=hashnode&utm_medium=feed)

What Testing Library is, why getByRole beats class names, and a complete first test with user-event, explained with one Subscribe button.

2d ago · 8 min read · ravindrarajpoot9454.hashnode.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#testing](https://hashnode.com/tag/testing)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#webdev](https://hashnode.com/tag/webdev)

## Written by

[Ravindra rajpoot](https://hashnode.com/@RavindraSingh)

@RavindraSingh

  
[View profile](https://hashnode.com/@RavindraSingh)

create blogs

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
