React Unit Testing Tutorial With React Testing Library and Vitest React

preview_player
Показать описание
In this React testing tutorial you will learn how to test React correctly. As React doesn't give us any testing tools we will use React testing library and Vitest in order to get an easy testing setup.

TIMESTAMPS
0:00 Introduction
1:39 Initial project
2:24 Vitest React
3:48 Basic component testing
9:26 Testing React props
12:40 Testing React callbacks
14:56 React mock dependencies
17:06 Testing plain functions

MOST POPULAR COURSES

FOLLOW ME

REFERENCES
Рекомендации по теме
Комментарии
Автор

Really helpful, keep up the good work!

devyadav
Автор

Good job, bro!
Btw, you said you have solved the issue with `SyntaxError: Cannot use import statement outside a module jest`.
Can you pls tell how you have done it?
There is tons of info about it but none of them solves the issue...

garikmelqonyan
Автор

Thanks for the video. Very helpful. Just curious, when you code personal projects, do you start with tests first or do you start with writing code first? Thanks.

kmdoll
Автор

Very good video, Thank you for sharing. I was thinking, since Cypress has its Component testing, is it not possible to just use Cypress ?

peshutanpavri
Автор

Does it work normally if we use React testing library + jest + vite and not vitest ?

waleedsharif
Автор

Nice presentation, but you are little bit fast with talking. Please move slowly, so that people can follow with you along because your presentation is excellent.

alishettima