TypeScript/React Testing: Components, Hooks, Custom Hooks, Redux and Zustand

  Рет қаралды 87,050

Jack Herrington

Jack Herrington

Күн бұрын

Пікірлер: 163
@nattysweg343
@nattysweg343 Жыл бұрын
Feels like I have been consuming content for years to stumble upon this gem
@EduardoYudjiNagashimaMiyata
@EduardoYudjiNagashimaMiyata Жыл бұрын
Even after two years, it is very current, congratulations!
@soulos45
@soulos45 Жыл бұрын
Thanks!
@herubond3610
@herubond3610 3 жыл бұрын
I really like the way you teaching about React and TypeSctipt stuff!!
@jherr
@jherr 3 жыл бұрын
Thanks!
@tsooooooo
@tsooooooo 2 жыл бұрын
No BS TS is such a good title for the book!
@curiousprogrammer90
@curiousprogrammer90 3 жыл бұрын
More on testing react and testing library please! :) Thanks for this!
@tarunsukhu2614
@tarunsukhu2614 3 жыл бұрын
As usual Gold Standard video. I still re-run your videos for refreshing older topics I may have not touched for a while. Also nice French beard Jack :-)
@jherr
@jherr 3 жыл бұрын
French beard, ok. Never heard that before, but I'll take it! 😀
@letok2871
@letok2871 2 жыл бұрын
I am angular developer which start explore react js, and I am consider your videos the most informative. Thank you for your content!!
@iqwebserve3973
@iqwebserve3973 Жыл бұрын
Excellent for newbies and as a refresher! Thanks!
@samuelvalentine7846
@samuelvalentine7846 2 жыл бұрын
Wow 👏, this is really no BS..ad free, straight to the point 👏
@matthewrideout426
@matthewrideout426 Жыл бұрын
Struggling to mock my zustand store and I thought I wonder if jack herrington will have a video on this. Bingo. What a guy. Thanks Jacky baby
@Satender-cd7zu
@Satender-cd7zu 9 ай бұрын
Thanks, you just solved my 3 hour work!
@lawrencejones51
@lawrencejones51 Жыл бұрын
Very nice video. My background is TDD since 2000 so its nice to see how to implement this paradigm in React (with different supporting libraries). Thanks so much!
@nimapourmohammadi4854
@nimapourmohammadi4854 2 жыл бұрын
Really Helpful and clean solutions. Thanks
@pfcosta84
@pfcosta84 3 жыл бұрын
I'm really amazed by the quality of each video that you've uploaded so far. I've basically shared them all with my colleagues. Given that you're introducing in BS/TS some design patterns and in this next premiere you're talking about Zustand, could we have a mix of both worlds? For instance, how to perform undo/redo operations using a command/memento pattern mixed with a state management library? Again, keep those videos coming! Really amazing stuff!
@jherr
@jherr 3 жыл бұрын
I like how you think Pedro! That video sounds like a fun one!
@danielflorencio9661
@danielflorencio9661 Жыл бұрын
Hey Pedro, are you Brazilian? I'm looking for a Dev job, lol
@hameedhameed5542
@hameedhameed5542 2 жыл бұрын
This is just awesome. With your help, I have a good grasp of what testing is.
@joraanbe
@joraanbe 2 жыл бұрын
Amazing and very very complete video, and is short!!! Thanks for sharing !!
@khudadadrasikh
@khudadadrasikh 2 жыл бұрын
I found it very helpful. Thank you Jack Herrington
@BSK_Rick
@BSK_Rick Жыл бұрын
Hey, Jack, thank you so much for that, i was try to test my hooks and well, this video make it so simple!
@mahu_4312
@mahu_4312 3 жыл бұрын
Hello Jack, thank you very much for all your Tutorials.
@jherr
@jherr 3 жыл бұрын
You are very welcome. Happy to have your views!
@antonioteixeira1779
@antonioteixeira1779 10 ай бұрын
Awesome, thank you from Brazil!
@SajidAliSoftwareEngineer
@SajidAliSoftwareEngineer 3 жыл бұрын
Jack really I dont have words for appreciation, awesome video, I learn about the react testing. I watch many videos but your video really clear my testing concepts. Thank you so much.
@amphetaminocid
@amphetaminocid 2 жыл бұрын
Please keep up. This video is awesome.
@boot-strapper
@boot-strapper 3 жыл бұрын
Been using this a lot the last 2 weeks on my current project
@jherr
@jherr 3 жыл бұрын
It's great, right? And MSW is super cool!
@adamwoolf9993
@adamwoolf9993 2 жыл бұрын
this is fantastic. Well paced, clear and logical explanations. 100% quality teaching and nice to see that you enjoy it!
@AlinaTudose
@AlinaTudose Жыл бұрын
That was so clean and clear 😊
@avinashvivek
@avinashvivek Жыл бұрын
Thank you very much Jack, for posting this video. I was trying to understand react testing since last 3 days and finally came here. Now I am very much clear with React Testing (with typescript). Thanks again 🙂
@parushanaidoo9183
@parushanaidoo9183 Жыл бұрын
Thank you for this tutortial. It really helps
@shivashankar6043
@shivashankar6043 3 жыл бұрын
Jack never failed to give awesome contents 👏
@andriimuntian3632
@andriimuntian3632 3 жыл бұрын
this is brilliant piece of knowledge you have shared here! Thank you!
@luislla3142
@luislla3142 2 жыл бұрын
Hello, let me show my gratitude, thanks so much for such an amazing job, quite practical aproach. Please continue doing videos like this.
@Berkeli
@Berkeli 2 жыл бұрын
The fact that the video only has 17k views makes me sad. Testing is so freaking cool and more people should be learning it. Excellent video
@ionut.vidrighin
@ionut.vidrighin Жыл бұрын
This tutorial is so damn good and I can admit that you're an incredible teacher on React; never found someone else here on KZbin providing better explanations and better experience overall. Super !!
@sumanmarahatha4274
@sumanmarahatha4274 3 жыл бұрын
Needed full series on react testing library with jest
@mustafe1391
@mustafe1391 2 жыл бұрын
Nothing but amazing content, you are doing great job! I have noticed myself skipping all other* tutorial stuff and always going to your videos. You are doing it right. Keep at it!
@donotthink
@donotthink 2 жыл бұрын
This here is quality content! Thank you!
@worldhello4012
@worldhello4012 2 жыл бұрын
It's so clear to understand. appreciate you to make this video :)
@ralphlargo9728
@ralphlargo9728 2 жыл бұрын
Thank you so much for this. This is exactly what i'm looking for
@mycovearomany455
@mycovearomany455 2 жыл бұрын
Thanks for this really nice video with practical examples. Testing React Context API would be great if included
@ImranKhansilvake
@ImranKhansilvake Жыл бұрын
very nice. Thanks for the video
@fotios4902
@fotios4902 2 жыл бұрын
Thanks for the awesome tutorial!
@bafian
@bafian 3 жыл бұрын
great content as always, loved zustand.
@HotRatsAndTheStooges
@HotRatsAndTheStooges 3 жыл бұрын
Really nice video, thanks a lot! Covers a lot in a really easy to digest format
@manantank
@manantank 2 жыл бұрын
This is such a good tutorial for testing. Thank you for your amazing work!
@vittoriomorellini1939
@vittoriomorellini1939 Жыл бұрын
This level of test is interesting, it is difficult to find such a deep level of test. This has to be the starting point to test deeply and with an acceptable code coverage a project quite complicated that I have in production
@ReQ1964SPA-vu4xu
@ReQ1964SPA-vu4xu 3 ай бұрын
You're a lifesaver man!
@sanazseifi5105
@sanazseifi5105 2 жыл бұрын
Such a great tutorial! Awesome, thank you so much.
@victorbadaro
@victorbadaro 2 жыл бұрын
wow man... what a video!
@idilenebrito6570
@idilenebrito6570 2 жыл бұрын
Simplesmente o melhor vídeo de testes que já assistir. Perfeito e com exemplos!
@muzamilahmed6396
@muzamilahmed6396 2 жыл бұрын
Hi Jack, Thank you so much for your tutorials. I would request you add a tutorial for material UI react testing. Thanks!
@JC-yy5nf
@JC-yy5nf Жыл бұрын
Absolutely great tutorial (although a little outdate, but that's normal). Great, simple, to-the-point steps and explanations, great voice delivery, great enthusiasm. Thank you for making these!
@alexanderleonardo5649
@alexanderleonardo5649 2 жыл бұрын
fast and easy to understand. thx
@andyazma4198
@andyazma4198 2 жыл бұрын
Thanks a lot, it's amazing video :)
@mehmetsayn573
@mehmetsayn573 2 жыл бұрын
Everything in nutshell. Thanks
@bscodev
@bscodev 3 жыл бұрын
Thanks best content of react and typescript!
@SajidAliSoftwareEngineer
@SajidAliSoftwareEngineer 3 жыл бұрын
Indeed a great video.
@Errorisedqt
@Errorisedqt Жыл бұрын
Thank you for your amazing content. You cant believe how much i learned and i am looking forward to more of your content. :)
@igotbit9454
@igotbit9454 2 жыл бұрын
perfect i needed this. thx
@FragmentFrontDeveloper
@FragmentFrontDeveloper Жыл бұрын
That was great. Please add example when add axios or wrap axios to custom method.
@aaronmcadam
@aaronmcadam 3 жыл бұрын
This was really great! I’ve bought the book, thanks! ❤️
@sandradivan2728
@sandradivan2728 Жыл бұрын
Hi Jack! I love all your videos; you speak very clearly, and I can understand almost everything you say. I would appreciate it if you could make a video explaining how to test functions that are inside a React component (and are not received via props) using mocks. Additionally, it would be great if you could demonstrate how to test different renders that result from useState changes within a functional component. Thank you very much! Greetings from Argentina! =)
@chaboxx159c
@chaboxx159c 2 жыл бұрын
thanks man ur really awesome
@eisanodehi
@eisanodehi 2 жыл бұрын
Great quality in everything. Thank you a lot. My youtube sidebar is all dedicated to Jack Herrington tho I'm watching them all the time.
@herbertpimentel
@herbertpimentel 3 жыл бұрын
OMG 😍 thank you... Again.
@ponderatulify
@ponderatulify 2 жыл бұрын
You just love pronouncing zuStand :))
@yasin_osman
@yasin_osman 3 жыл бұрын
Thank you so much for your amazing content, i really would like to see your channel growing. Keep up the good work 👏👏👏
@rival-slays
@rival-slays 3 жыл бұрын
Blown away by the videos I’ve seen so far. No one is covering these more advanced topics as well as you do. What is the extension that gives you the test autocomplete btw? I was so impressed by how accurate it was.
@igormundim
@igormundim Жыл бұрын
The best. Obrigado!
@aghileslounis
@aghileslounis 2 жыл бұрын
You are just so good ! I consider myself like a Mid level developer with 3yrs of exp but you are just on another level, first time i see on youtube a true Senior/Lead or even higher I don't know whats above that lol, you inspire me to become better on every video you make, thanks for your great effort. In addition to that I want to know what's your opinion about the "Outside In tdd" and "Inside out tdd" what approach is better if there is one ?
@27sosite73
@27sosite73 11 ай бұрын
thank you
@mohammadshahjalal810
@mohammadshahjalal810 4 ай бұрын
Amazing 😍
@marvinotieno2194
@marvinotieno2194 9 ай бұрын
Thanks for the video it's been really helpful. Could you also show how to test components that require the thunk middleware?
@user-gs2zp3dm1v
@user-gs2zp3dm1v 2 жыл бұрын
thanks a ton
@keiji0075
@keiji0075 2 жыл бұрын
more than best
@mohammadshahjalal810
@mohammadshahjalal810 4 ай бұрын
I'm becoming fan of you.
@decentrob8126
@decentrob8126 2 жыл бұрын
why you would use waitFor instead of findByRole (17:20)? Is there a difference?
@mridulmishra8166
@mridulmishra8166 2 жыл бұрын
Wow.. just wowww
@LoryKa
@LoryKa 2 жыл бұрын
13:30 : why "count is 0" not true, since we clicked the element only after getting the value of divElement, therefore the divElement should be still 0 and not 1. I tried something similar in my application: I tried to test whether the counter is increasing after we press the "+", therefore I got the span's value, stored it in value1, fired a user event, stored the second value in value2, and check whether value2 > value1 and the test passed. Could you please explain why is this difference?
@LoryKa
@LoryKa 2 жыл бұрын
My bad, I was storing the .textContent property of the span element, and not the actual span element. Since the span element is an object, if you access the textContent property after the fire event it's gonna show the new value
@djaniivanov4117
@djaniivanov4117 2 жыл бұрын
good video! i'd like to see a full-stack build by you. App with front-end typescript with react,state management and backend part with express and mongo for example + tests.That's is a good idea for a series of videos i think.Greetings!
@nicholassmith6412
@nicholassmith6412 2 жыл бұрын
14:32 - interesting way of calling fetch when a component mounts. You said that it prevents setData from being called if the fetch is late and the component is unmounted. But would this mean that occasionally the page would load without fetching any data? Could you not just add data is a dependency to the useEffect hook and just add a guard clause at the top checking if data is undefined then just return? Also, why does it return a function that sets isMounted to false rather than just setting it to false and adding a return after setData? Feels like some pro code that I don’t understand. Great video btw!
@dailymeow3283
@dailymeow3283 3 жыл бұрын
Lol i like the thumbnail 🤭🤭
@lalitkandpal1483
@lalitkandpal1483 2 жыл бұрын
How can i write a test for hook passed by props in component and pass setHook in test
@jherr
@jherr 2 жыл бұрын
You test the component and that should test the hook.
@arupkumargupta6128
@arupkumargupta6128 2 жыл бұрын
Its a great tutorial. Thanks. One question on testing async custom hooks How do you test the cleanup of the use effect?
@amitsinghrawat4760
@amitsinghrawat4760 3 жыл бұрын
Hi Jack, can you make a video tutorial on sorting react import automatically
@SyedZainUlHasan
@SyedZainUlHasan 2 жыл бұрын
Really nice lecture Jack. How we can test components with tables?
@jherr
@jherr 2 жыл бұрын
Feel free to jump on the Discord server discord.gg/eJ5bYFb6 and post a question in the #react channel. That being said please read the #rules first and make sure that you post a succinct question that is answerable by the volunteers on the server.
@miguelship3
@miguelship3 2 жыл бұрын
Do you have a video for testing an rtk query endpoint?
@someonewhowantedtobeahero3206
@someonewhowantedtobeahero3206 3 жыл бұрын
Loved this one. Does anyone know what theme and font he's using? Looks neat.
@jherr
@jherr 3 жыл бұрын
Night Wolf [dark] and MonoLisa.
@someonewhowantedtobeahero3206
@someonewhowantedtobeahero3206 3 жыл бұрын
@@jherr Thanks a lot! MonoLisa seems to be a paid font so I settled for Cascadia Code, and my editor looks great after a few background color tweaks.
@anujupadhyay10
@anujupadhyay10 Жыл бұрын
10/10 😉
@amajuify
@amajuify Жыл бұрын
Great content Jack. Is there a way to test the flow of a custom hook that dispatches redux actions? I'm asking this because redux-saga was introduced to a new project i'm working on by a senior developer that newly joined the team, and the selling point was we can test the flow of a side-effect using redux-saga as opposed to a custom react hook where we can't test the flow. During my research about redux-saga, I found that a lot of teams are moving away from it and the docs for it hasn't been updated. Would you recommend using redux-saga?
@chauhan035
@chauhan035 2 жыл бұрын
Awesome
@thatWebGuySolutions
@thatWebGuySolutions Жыл бұрын
Great stuff! Is fireEvent better than user? Also for orgState why not grab current state before each test?
@MrKeepItTrill
@MrKeepItTrill 2 жыл бұрын
Great video! Is there any meaningful difference between resetting the Zustand store on beforeEach vs afterEach?
@jherr
@jherr 2 жыл бұрын
I don't think so.
@devsami
@devsami Жыл бұрын
Just a quick question do we need a ts-jest transformer ?
@edydflow5524
@edydflow5524 Жыл бұрын
I got error "a test was not wrapped in act(...)." event if I run it on act method. May be i have missed something? 🤣
@ahmedsoran4710
@ahmedsoran4710 2 жыл бұрын
thank you for this great tutorial but im confused why we need to waste a huge time writing testing code when you can use console log and see results?!
@tomascarignano5002
@tomascarignano5002 2 жыл бұрын
Yesssss
@GoodHomeVideos
@GoodHomeVideos Жыл бұрын
I’d really like to know how to test a component that uses a ref on a HTML element. I’ve had so much trouble with this.
@gerardsiles
@gerardsiles Жыл бұрын
I'm getting this error: App.test.js: Support for the experimental sy ntax 'jsx' isn't currently enabled
@mani8586
@mani8586 3 жыл бұрын
Hi Jack, can we have a session on Redux Saga...
@vittoriomorellini1939
@vittoriomorellini1939 Жыл бұрын
Is react-testing-library the right tool to make both integration test and e2e tests? this video was very cool and usefull. I downloaded the source. Thank you for sharing
TypeScript Pub/Sub Patterns (No BS TS Series 2 Episode 2)
22:46
Jack Herrington
Рет қаралды 21 М.
Mastering React Memo
26:56
Jack Herrington
Рет қаралды 138 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Next.js with React Testing Library, Jest, TypeScript
25:04
Dave Gray
Рет қаралды 73 М.
You're Doing React Hooks Wrong, Probably
20:11
Jack Herrington
Рет қаралды 64 М.
Тестирование React приложения
1:03:02
Михаил Непомнящий
Рет қаралды 65 М.
When To Unit, E2E, And Integration Test
14:58
ThePrimeTime
Рет қаралды 105 М.
React Testing Tutorial with React Testing Library and Jest
41:43
The ONLY REASON To Unit Test
8:26
Theo - t3․gg
Рет қаралды 87 М.
Mastering React Hooks with Typescript
55:12
Jack Herrington
Рет қаралды 101 М.
Testing In React Tutorial - Jest and React Testing Library
21:28
Stop Writing So Many Tests
10:02
Web Dev Simplified
Рет қаралды 97 М.