---
title: "Discussion on \"How to Confidently Write Unit Tests using React Testing Library\" | Hashnode"
description: "Discussion on \"How to Confidently Write Unit Tests using React Testing Library\". How to Confidently Write Unit Tests using React Testing Library"
url: "https://hashnode.com/posts/how-to-confidently-write-unit-tests-using-react-testing-library/6389933cf2da0b1628a2717e"
---

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

Discussion

# [How to Confidently Write Unit Tests using React Testing Library](https://blog.yogeshchavan.dev/how-to-confidently-write-unit-tests-using-react-testing-library?utm_source=hashnode&utm_medium=feed)

How to Confidently Write Unit Tests using React Testing Library

Dec 2, 2022 · 18 min read · blog.yogeshchavan.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#codenewbies](https://hashnode.com/tag/codenewbies)

## Written by

[Yogesh Chavan](https://hashnode.com/@myogeshchavan97)

@myogeshchavan97 · India

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

Full Stack Developer | Freelancer | JavaScript | React | Nodejs. https://yogeshchavan.dev/. Book 1:1 @ hiretheauthor.com/myogeshchavan97

Full Stack Developer | Freelancer | JavaScript | React | Nodejs. Loves sharing knowledge through technical articles. Dev.to: https://dev.to/myogeshchavan97 https://linktr.ee/myogeshchavan97

## Responses 1

Markdown supported · ⌘↵ to post

[Hrushi M](https://hashnode.com/@superflows)

[Dec 3, 2022](https://hashnode.com/posts/how-to-confidently-write-unit-tests-using-react-testing-library/6389933cf2da0b1628a2717e/comment/638aff56afa1e687fea3b5d8)

Good one! You could also add how to test when external modules are imported and used in a component. Particularly when and how to mock certain modules or functions. Something on code coverage as well. Cheers!

[Yogesh Chavan](https://hashnode.com/@myogeshchavan97)

[Dec 5, 2022](https://hashnode.com/posts/how-to-confidently-write-unit-tests-using-react-testing-library/6389933cf2da0b1628a2717e/comment/638aff56afa1e687fea3b5d8#reply-638d85e44a96bb8fda43a3c6)

[Hrushi M](https://hashnode.com/@superflows) That's included [in the course](https://online-elearning-platform.netlify.app/)
