Navigate Select ESC Close

React Testing for Beginners: Start Here!

2024-02-27 Education
264.9k
4.6k
192
Programming with Mosh
Programming with Mosh
5.1m subscribers

Unlock all features

FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.

Description

Ready to master React testing? This tutorial covers the essentials of React Testing Library with Vitest / Jest. Get hands-on and start writing better tests today! 🚀 Want to take your skills to the next level? - Check out my full course "React Testing Mastery": https://bit.ly/3IBuILB - Subscribe for more videos like this: https://goo.gl/6PYaGF ✋ Stay connected: - Twitter: https://twitter.com/moshhamedani - Facebook: https://www.facebook.com/programmingwithmosh/ - Instagram: https://www.instagram.com/codewithmosh.official/ - LinkedIn: https://www.linkedin.com/school/codewithmosh/ 👉 Related tutorials: - JavaScript Unit Testing Tutorial: https://youtu.be/zuKbR4Q428o?si=tjVNNCY9FA4EEbPO - React Tutorial for Beginners: https://youtu.be/SqcY0GlETPk?si=SopHGRFperVxzxyt - TypeScript Tutorial for Beginners: https://youtu.be/d56mG7DezGs?si=hrEBCURyaKVqFH9c 👉 Full courses: - React Testing Mastery: https://codewithmosh.com/p/react-testing-mastery - React 18 for Beginners: https://codewithmosh.com/p/ultimate-react-part1 - React 18- Intermediate Topics: https://codewithmosh.com/p/ultimate-react-part2 - Mastering JavaScript Unit Testing: https://codewithmosh.com/p/mastering-javascript-unit-testing - The Ultimate TypeScript Course: https://codewithmosh.com/p/the-ultimate-typescript 📖 TABLE OF CONTENT 0:00:00 – Introduction 0:01:21 – Prerequisites 0:03:00 – Course Structure 0:04:46 – How to Take this Course 0:06:37 – Setting Up the Development Environment 0:07:36 – Setting Up the Starter Project 0:13:31 – Setting Up Vitest 0:17:19 – Setting Up React Testing Library 0:20:24 – Testing React Components 0:21:15 – What to Test 0:24:31 – Testing Rendering 0:33:12 – Simplifying Test Setup 0:36:16 – Exercise: Testing UserAccount 0:41:52 – Announcement 0:42:41 – Testing Lists 0:48:46 – Exercise: Testing ProductImageGallery 0:53:08 – Testing User Interactions 01:02:04 – Exercise: Testing ExpandableText 01:13:17 – Simplifying Tests #react #reactjs #testing

Top Comments (10)

@invertedcoder 2024-02-27

Mosh has got some insane skilles

32
@tonishant 2024-02-27

One of the best tutor on YT.

18
@bcb3548 2024-02-27

Was looking up Vitest yesterday and Mosh drops this! Couldn't have been more auspicious.

17
@programmingwithmosh 2024-02-27

- Want to learn more? Get the full course: https://codewithmosh.com/p/react-testing-mastery - Subscribe for more videos like this: https://goo.gl/6PYaGF

12 11 replies
@FutureCodingStars 2025-09-07

The emphasis on testing behavior rather than implementation is a crucial concept to grasp for anyone starting out with testing. That philosophical shift saves so much time in the long run. It's great to see a video that covers this so clearly.

5
@ky8designs 2024-02-27

Thank you Mosh for your efforts, I loved programming because of you.

5
@JoyDBa24 2024-02-29

Good job again Mosh. So, Modern Angular testing course would be appreciated.

5
@MsJpolanco 2026-01-27

so refreshing to watch a meaningful tech tutorial in the era of LLMS and AI hype :)

3
@pandalife1313 2024-03-11

This is the first video that explains everything about React Testing indetails and in a clear format. Thank you so much Mosh

2
@SaadxBaig 2024-02-27

Can’t wait to learn more about testing in react Mosh! The best teacher out there

1

Unlock the Data Inside
Turn Videos into Knowledge

  • Get FREE 10/day: transcripts, summaries, chats
  • Chat with videos, export text & PDF
  • $1 free API credit for RAG, chatbots & research

Free forever plan • All features unlocked

App screenshot