React Testing Tutorial with React Testing Library and Jest

  Рет қаралды 121,744

Lama Dev

Lama Dev

Күн бұрын

React testing crash course using Jest and React testing library.
Discover Wallaby: bit.ly/lamadevwallaby
Get a 20% discount: bit.ly/wallaby20
Support the channel: / @lamadev
Buy me a coffee: www.buymeacoffee.com/lamadev
Source Code: github.com/safak/youtube2022/...
Join Lama Dev groups
Facebook: / lamadev
Instagram: / lamawebdev
Discord: / discord
0:00 Introduction
0:44 Why testing is important?
2:34 React Testing Crash Course
16:00 Jest vs Testing Library?
17:00 React Testing Real World Example
34:40 React Jest Mock Async Data Testing Example w/ Axios
41:13 Outro

Пікірлер: 134
@berkinakkaya981
@berkinakkaya981 2 жыл бұрын
You made the whole process look extremely simple. Great tutorial, thanks!
@shawn.builds
@shawn.builds Жыл бұрын
The testing library gets updated/refreshed so frequently, your video was the most relevant and straightforward. Thanks so much!
@exequielmleziva4599
@exequielmleziva4599 Жыл бұрын
For those having issues with Axios in jest, put this in your package.json user the 'scripts' object: "test": "react-scripts test --transformIgnorePatterns \"node_modules/(?!axios)/\"", It worked for me, hope it works for you too.
@Corntrop
@Corntrop 2 жыл бұрын
Tdd was always weird to me but after this tutorial it makes sense. Thank you so much.
@eprisrichardson678
@eprisrichardson678 Жыл бұрын
You always explain things in a way that even a kid could understand. This was very helpful. I'm using Mock Service Worker as recommended in the Testing Library docs, so I guess my mock API will be setup differently. I just have to figure that out. Thanks for the tutorial!!!
@luffymonkey6967
@luffymonkey6967 Жыл бұрын
Yes!!! Exactly the kind of video i was looking for and from an amazing channel that I like. Just started watching recently and your video tutorials are really good!
@jonathanbriceno3865
@jonathanbriceno3865 2 жыл бұрын
Extraordinary video, all the content is very useful because you explain in a perfect way all the concepts of testing. It would be great to see other videos on this important topic. Immensely grateful.
@wmv1990
@wmv1990 2 жыл бұрын
Excellent tutorial, love it, thanks Lama Dev. For anyone struggling with JEST intelli-sense not coming up in Visual Studio code.(automatic methods and variables suggestions popping up) Just add a file named ' jsconfig.json ' at root level i.e in your top project folder and paste below code in that file. { "typeAcquisition": { "include": [ "jest" ] } } Probably restart VS code to be sure it got embedded.
@carloscambon5402
@carloscambon5402 Жыл бұрын
Thank you for your simplicity. You make it very easy to assimilate.
@som_girl6702
@som_girl6702 11 ай бұрын
You’re a great teacher. Few minutes into your video, I understood testing without prior knowledge of JS testing
@ozzyfromspace
@ozzyfromspace 2 жыл бұрын
Okay, while I'm riding the high of confidence you gave me about TDD, lemme start working on a react project with this approach :) . Thanks, Lama Dev!!
@jasonma1904
@jasonma1904 2 жыл бұрын
Nice tutorial. Explained everything so well and was easy to understand.
@PattyBeautCode
@PattyBeautCode Жыл бұрын
love your contents ! and waiting for more test tutorials with the project you have built ! 🥰
@okorojohn7788
@okorojohn7788 2 жыл бұрын
Nice one from Genius Lama. Many thanks for wonderful lectures you dish out.
@SimPwear84
@SimPwear84 2 жыл бұрын
Wow!! This is world class content 👑. Looking forward to more testing tutorials. Integrated testing 🔥 Redux 🔥 Node backend 🔥 But it is just a wish 😭😭😭
@gonzalowilliams
@gonzalowilliams 2 жыл бұрын
Thanks Bruno! Amazing playlists. Thanks for your time
@corinapelichowski2950
@corinapelichowski2950 5 ай бұрын
Right, it’s hard to find relevant KZbin tutorials because everything in the tech world is changing so fast and things get old too quickly. HOWEVER! This is the best React Testing tutorial I have come across so far. It’s relevant, to the point, and super easy to follow along. I highly recommend going to the git repo, downloading it, deleting the test file, and follow along. That way you can learn how to test without getting overwhelmed with learning the components too. 10/10
@michiharuono4050
@michiharuono4050 Жыл бұрын
This is a GOLD content. Thanks Lama! Please make videos with TDD :)) I will definitely watch all of your videos!
@sharathjayagopal
@sharathjayagopal Жыл бұрын
Great tutorial!🔥🔥🔥 Learned a lot 👍👍👍. Thanks so much and hope to learn more from you in the future.
@ouniradoin7027
@ouniradoin7027 Жыл бұрын
you are amazing i never saw a tutorial like that with a nice explanation
@azfacts9968
@azfacts9968 2 жыл бұрын
That was great 👍 need more videos on testing library and please also mentioned source
@alainroos5383
@alainroos5383 Жыл бұрын
Very good tutorial as always ! Thank you
@musab9621
@musab9621 2 жыл бұрын
Awesome video we would like more content like this testing and integration testing
@mdalimran7926
@mdalimran7926 2 жыл бұрын
Wow! It's really a great video about testing. We're expecting a series video about testing PLEASE... 😍😍😍
@khangle5968
@khangle5968 2 жыл бұрын
Liked before watching because I know this is gonna be an amazing video! Thank you!
@caservtom7485
@caservtom7485 2 жыл бұрын
Lama, thank you. I learned so much from your videos.
@ayushshende4290
@ayushshende4290 2 жыл бұрын
Big Fan Lama, amazing content as always. Just a request, if you could make some tutorials on web3 and dapps development.
@vijayaganthsivalingam9789
@vijayaganthsivalingam9789 Жыл бұрын
it's great one. We need some more real world examples. Thanks!
@marufmarzuq
@marufmarzuq 2 жыл бұрын
Thank you friend for this amazing tutorial ❤️
@mattsmith541
@mattsmith541 2 жыл бұрын
Excellent tutorial. Thanks a lot!!
@mD-mp8bb
@mD-mp8bb Жыл бұрын
Entrance Song👍👍 I knew Jest and react testing library but I watched the course again.
@grogu4344
@grogu4344 2 жыл бұрын
good job man, more testing video with this library is appreciated! :) Can you do also a video with react and cypress? you suggest this library for testing?
@adebisisheriff159
@adebisisheriff159 Жыл бұрын
Thanks for your simplicity
@AbhishekKumar-pe5lg
@AbhishekKumar-pe5lg 2 жыл бұрын
AWESOME VIDEOS, We would like to have more videos on react testing. Thanks
@worldbest3097
@worldbest3097 2 жыл бұрын
thx! always waiting and watching!!
@arifhusainsoudagar8869
@arifhusainsoudagar8869 2 жыл бұрын
Awaiting for this 😇 thank you
@mfion1
@mfion1 2 жыл бұрын
great video and good code organization
@user-sf7yg1oo6x
@user-sf7yg1oo6x 2 жыл бұрын
Wow this is very Goood tutorial. Thank you. and Could you explain cypress end-to-end testing also?
@dalestewart
@dalestewart 2 жыл бұрын
Good introductory tutorial using TDD.
@manojkumars995
@manojkumars995 Жыл бұрын
Thanks a lot this made me understand how TDD works
@viniciusm.m.7822
@viniciusm.m.7822 2 жыл бұрын
Obrigado, meu brother! God bless you!
@haciendadad
@haciendadad 2 ай бұрын
GREAT Video!! Man, I HATE unit testing!!! Now I joined a new team and they assigned me to get the teams unit test coverage to be at least 85%. All our code is in React, so I am hoping that I can use this test library because it looks a lot more fun than the regular jest. And that Wallaby VS Code extension is awesome! I might even do some unit testing on the weekends? uh, maybe once or twice only. :-) Definitely subscribed and liked!! I really like everything about his testing style. Good pace, great examples! I hate super simple examples. And the length isn't too long, well done sir! #HatTip!
@fichamann1527
@fichamann1527 2 жыл бұрын
I was afraid of test but your tutorial is easy to understand.
@sherlya6440
@sherlya6440 Жыл бұрын
Good Tutorial for beginners. Thanks
@daliovic24
@daliovic24 Жыл бұрын
This was extremely helpful!
@noisinnang8371
@noisinnang8371 29 күн бұрын
Thank you very much. I would also like to see a video on testing sign-in with Google and using some kind of authentication. I also want to see more videos on React or Next.js projects with MySQL
@dansalomon7112
@dansalomon7112 Жыл бұрын
Awesome tutorial !👑
@xcrxwadda8287
@xcrxwadda8287 2 жыл бұрын
I literally love your projects,,, please more MERN projects
@mahendranath2504
@mahendranath2504 Жыл бұрын
Thank you so much for the excellent content 👍👌🙌❤💕
@ashrafshehata6566
@ashrafshehata6566 2 жыл бұрын
nice tutorial and easy to understand
@ozkanselcuk1735
@ozkanselcuk1735 2 жыл бұрын
This channel without any other source can make you a full stack developer. Again great job and amazing content Safak.
@diegocodes1202
@diegocodes1202 2 жыл бұрын
Don't come here talking shit man
@picklenickil
@picklenickil 2 жыл бұрын
Ayy... Lama back again with another banger..
@zackOverflow
@zackOverflow 2 жыл бұрын
Hi, thank you for the content. I like to ask, can I apply the same concept as in this video to test React Native App?
@tauhidhasan5527
@tauhidhasan5527 10 ай бұрын
Thanks it is cristal clear to me now
@shahemhaddad2717
@shahemhaddad2717 Жыл бұрын
Thanks for the good content, I have a question about using Jest on Nodejs app, after a long search I found that I have to use babel as a compiler (babel-jest) to be able to work with ES6 syntax. are there a way to deal with it the same way you did here for react app? Thanks a lot 🙌
@adejumoahmad2679
@adejumoahmad2679 2 жыл бұрын
Thanks so much lama dev, i have always wanted to learn tdd but didn't knw how to go about it 😢
@jonmaridandal3213
@jonmaridandal3213 2 жыл бұрын
This is what i needed right now
@mohamedabdulla8097
@mohamedabdulla8097 Жыл бұрын
Great. Want more in this topic
@alihafezis
@alihafezis Жыл бұрын
very nice. please create another tutorials about react testing library 💪🤟
@manishachollangi3874
@manishachollangi3874 7 ай бұрын
Loved it❤❤.. thank you so much sir, can you please make videos on react with redux saga sir
@RavindraSingh-lp9pl
@RavindraSingh-lp9pl 9 ай бұрын
@Lama Dev...kindly make complete course on Jest Testing
@ogbuezekiel7400
@ogbuezekiel7400 2 жыл бұрын
LamaDev is the man of the year!!! 🥰
@toomanyarguments
@toomanyarguments Жыл бұрын
hey, i have a very often crucial question. i have to test a component which gets a setState function as a prop, how can i mock this setState function while testing the component?
@AhmedAdel-xg1cm
@AhmedAdel-xg1cm 2 жыл бұрын
Thank you friend for this amazing tutorial you are my hero :) , could you please make restaurant management api using node js
@hsingh110
@hsingh110 Жыл бұрын
a really great tutorial, thank you so much! I was able to follow and understand up to 36th minute. Why do we create a __mocks__ directory and an axios.js file in it and not use them?
@Endrit719
@Endrit719 Жыл бұрын
Earned my subscribe
@Leonavancini
@Leonavancini Жыл бұрын
This help me a lot to understand how its works , its a very good tutorial and simple. All testing cases need to be very methodical right? This take me a lot of time to made it, now I understand why some companies don't have tested applications, BTW I don't know if I'm right but it's necessary to make a test to check if error message will visible in error case right? I wanna try to make it that test.
@natyt.1503
@natyt.1503 Жыл бұрын
really helped me out with this one thanks...btw, do you do any BDD by any chance...something with Cucumberjs and gherkin would really be much appreciated...thanks for all your vids
@divewithadarsh914
@divewithadarsh914 2 жыл бұрын
Love from India.❤️ Your teaching style is just awesome. Much better than the millions of web dev related youtube videos, the way you explain every single little thing with too much simplicity is just beyond admiration. Please start uploading the playlist of web technologies i bet you will be the one of the most successful and the most Praised youtuber in the upcoming years.We need that the most. God bless you ❤️
@karlithoscolima
@karlithoscolima 2 жыл бұрын
More testing pleaseeeeee
@hellocat7760
@hellocat7760 Ай бұрын
i will need more about advanced testing using jest/vitest, lama you are super fast and Smart Dev. Your teaching style is amazing. ✨✨jjj
@petermuturi4402
@petermuturi4402 2 жыл бұрын
This was awesome
@darmar8609
@darmar8609 2 жыл бұрын
Thanking you! 👏
@JohnDoe-rh2fw
@JohnDoe-rh2fw Жыл бұрын
Great job, for real 👍
@piyushmahapatra5402
@piyushmahapatra5402 2 жыл бұрын
damn, are you a demi god ? this is world class content.
@isahbala2540
@isahbala2540 2 жыл бұрын
Please what microphone are you using for this video
@nurettinsen473
@nurettinsen473 2 жыл бұрын
mocha chai for backend please, because you You explain the topics very well. and We are waiting for examples on redis topic (:
@eghambaramsubramanian3188
@eghambaramsubramanian3188 2 жыл бұрын
Wow Lama.. Can you make react developer tool usage video
@061_suryak4
@061_suryak4 Жыл бұрын
hi, i got error like could not find react-redux context value; please ensure the component is wrapped in a but i also wrapped by provider within store and i change old to latest version please gave me a any solution
@tupac0199
@tupac0199 2 жыл бұрын
Thanks lama.
@codeenv
@codeenv 2 жыл бұрын
wow this is awesome and great looks cool and please lama can you create an app with email verification using the MERN STACK?
@ryeasv
@ryeasv 4 ай бұрын
thanks alot
@masterkey-do3jv
@masterkey-do3jv 9 ай бұрын
great tutorial on internet of jest
@Rick-pz1ju
@Rick-pz1ju Жыл бұрын
Yoo, thanks, now All my react counters Will be tested hahaha ver Nice video
@cristianparadagualteros3305
@cristianparadagualteros3305 2 жыл бұрын
This is amazing, and among other things I learn English
@snorlax-frontend
@snorlax-frontend Жыл бұрын
i want to know. when did u start learning in this field
@rajankhunt7002
@rajankhunt7002 Жыл бұрын
Good Video, Good Explenantion, Good Content and My good comment.
@gbolaboaluko5576
@gbolaboaluko5576 2 жыл бұрын
Are you going to do a tutorial on react native
@mauroinde
@mauroinde Жыл бұрын
Maybe you can do the next of this with redux passing data to a component in testing ?
@dalyryl
@dalyryl 2 жыл бұрын
ooh sheeshhhhh here it is!
@kavinkumarb7323
@kavinkumarb7323 Жыл бұрын
Need more testing videos 😞
@KaranSethia24
@KaranSethia24 6 ай бұрын
does rtl and jest work with react app created with vite??
@sarfarajshaikh6038
@sarfarajshaikh6038 Жыл бұрын
Can we have a video on svelte testing?
@manojrao9867
@manojrao9867 Жыл бұрын
Wonderful.
@rampritsahani281
@rampritsahani281 2 жыл бұрын
Thank you for this wonder full testing video ca you please create with redux toolkit
@sachinporwal4275
@sachinporwal4275 2 жыл бұрын
Make one video for node js Testing. Means how to test backend in MERN Application
@HimanshuSharma-zi5ve
@HimanshuSharma-zi5ve 2 жыл бұрын
this guy reads my mind 😂
@LopsidedView514
@LopsidedView514 4 ай бұрын
Can somebody tell me which testing extension is he using?
@mehrdad1068
@mehrdad1068 2 жыл бұрын
Hi lama please make tutorial for building marketplace like opensea 🌱🌻
@geepy5708
@geepy5708 Жыл бұрын
Why do we need to perform testing operations?
Material UI 5 (MUI) React Tutorial | MUI Responsive Real Project
1:15:41
Next.js with React Testing Library, Jest, TypeScript
25:04
Dave Gray
Рет қаралды 50 М.
OMG 😨 Era o tênis dela 🤬
00:19
Polar em português
Рет қаралды 12 МЛН
Заметили?
00:11
Double Bubble
Рет қаралды 2,9 МЛН
ELE QUEBROU A TAÇA DE FUTEBOL
00:45
Matheus Kriwat
Рет қаралды 27 МЛН
1🥺🎉 #thankyou
00:29
はじめしゃちょー(hajime)
Рет қаралды 78 МЛН
Why Vitest Is Better Than Jest
13:13
Web Dev Simplified
Рет қаралды 127 М.
10 分钟 理论 + 实操 搞懂 WebSocket
9:03
FireUG技术社区
Рет қаралды 14 М.
React Unit Testing Tutorial With React Testing Library and Vitest React
19:12
Monsterlessons Academy
Рет қаралды 9 М.
Mocking Asynchronous Functions with Jest
21:50
Swashbuckling with Code
Рет қаралды 65 М.
Learn React Hooks: useCallback - Simply Explained!
17:15
Cosden Solutions
Рет қаралды 70 М.
CSS Tips And Tricks 2 | I Wish Somebody Told Me Before
12:36
Lama Dev
Рет қаралды 38 М.
Stop Writing So Many Tests
10:02
Web Dev Simplified
Рет қаралды 80 М.
React Testing Tutorial - 42 - Mocking Functions
8:05
Codevolution
Рет қаралды 39 М.
React Real Estate App UI Design Tutorial for Beginners
3:01:48
Lama Dev
Рет қаралды 63 М.
Nokia 3310 versus Red Hot Ball
0:37
PressTube
Рет қаралды 3,8 МЛН
iPhone 15 Pro vs Samsung s24🤣 #shorts
0:10
Tech Tonics
Рет қаралды 10 МЛН
Индуктивность и дроссель.
1:00
Hi Dev! – Электроника
Рет қаралды 1,6 МЛН
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 13 МЛН
Pratik Cat6 kablo soyma
0:15
Elektrik-Elektronik
Рет қаралды 8 МЛН
The power button can never be pressed!!
0:57
Maker Y
Рет қаралды 55 МЛН