Тёмный

Introduction To Testing In JavaScript With Jest 

Web Dev Simplified
Подписаться 1,6 млн
Просмотров 512 тыс.
50% 1

Testing is one of those things that people either love or hate. Usually testing is something that is hated, until you work on a project with good tests and you realize how amazing they are. In this video I am going to show you how to get started with testing in JavaScript using Jest. I will talk about the code you need in order to write tests, as well as show you some pitfalls of testing. At the end of the video I will breakdown the importance of testing and some best practices you can adhere to in order to make your tests amazing.
📚 Materials/References:
Spread Operator Video: • Why Is Array/Object De...
Reference Vs Value Video: • Reference Vs Value In ...
🧠 Concepts Covered:
How to install Jest
What unit testing is
Why testing is important
How to write unit tests with Jest
The importance of test coverage
🌎 Find Me Here:
My Courses: courses.webdev...
Patreon: / webdevsimplified
Twitter: / devsimplified
Discord: / discord
GitHub: github.com/Web...
CodePen: codepen.io/Web...
#Jest #WDS #UnitTest

Опубликовано:

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 378   
@deansprivatearchive
@deansprivatearchive 3 года назад
This is a developer that truly knows what he's talking about, nonstop, in facts, and fast - short and simple, bite-sized tips to all development. Master branch, honestly.
3 года назад
Nope, he's a normal dev just like us. He just has the power of editing. He got a video on that.
@deansprivatearchive
@deansprivatearchive 3 года назад
​@ I know, that's not what I'm saying - No matter how much debugging he cuts out, the coding and aesthetics themselves are made by a developer that truly knows what he's talking about.
@juanbomfim22
@juanbomfim22 3 года назад
@@deansprivatearchive I agree. And what reinforces it is his incredible diction
@gainz6180
@gainz6180 Год назад
@whats the name/link of that video?
@drchrisntsako1339
@drchrisntsako1339 Год назад
I'm someone who don't comment on videos but whenever I search for a video and see yours, I always choose you. you are the best man
@jbruell94
@jbruell94 5 месяцев назад
1000% agree.
@fragileglass9622
@fragileglass9622 5 лет назад
That's awesome. I was just searching on Udemy for a Jest testing course when this popped up. Weird. I'd would really like to see more testing or production deployment ready based courses. Best practices for making app's well tested and properly staged for active use and deploy. It's a topic that is missed very often.
@WebDevSimplified
@WebDevSimplified 5 лет назад
I agree. I want to try to cover more testing related information on this channel since I find it quite enjoyable.
@nerdiloo9863
@nerdiloo9863 4 года назад
AI : You're welcome. Human.
@BjornBrasse
@BjornBrasse 3 года назад
Please add more video's on testing. Perhaps a course specifically on this subject. I'm sure many people are interested!!
@Misfittykitty
@Misfittykitty 2 года назад
@@BjornBrasse I agree--I would 100% sign up for a full course on this by Kyle. I loved his React course, and recommend it!
@hetroxity
@hetroxity Год назад
Kyle bro .. i love how you talk smoothly and going step by step without hurry..
@mauricioviera6
@mauricioviera6 4 года назад
Thanks. I'm going through a job interview and they asked me to run unit tests, so this is really helpful as a start. Really appreciate it
@aurumstinger4479
@aurumstinger4479 5 месяцев назад
Did everything go well??
@tracynnnn
@tracynnnn 2 года назад
Notes - test script: "jest --coverage" will detail what's being tested and what's not - Unit tests test the smallest part of your code - toBe() vs toEqual()
@chickenchoclates1971
@chickenchoclates1971 2 года назад
i love you mate...
@brunoichbinfdp
@brunoichbinfdp Год назад
thanlks a million times
@JamesQQuick
@JamesQQuick 3 года назад
Using this as a first intro to jest for me. Thanks Kyle!!
@ANDREPEIXOTO1
@ANDREPEIXOTO1 3 года назад
Me too. Thanks, Kyle! I'll have a technical interview covering jest and this video was helpful. Now I'm going to dive deeper into it.
@calebsirma3867
@calebsirma3867 8 месяцев назад
Never found a guy so smooth in explanation in 14 minutes.
@highestaccomplisher
@highestaccomplisher 3 года назад
OMG. I am a Manual Testing upping my technical skills to become an Automated Tester and it is the first video I see (after months of seriously researching a lower than beginner level tutorial) that really help me write my first Javascript testing script in 5min. Thank you so much.
@tech3425
@tech3425 Год назад
It would be nice to have a Jest course for typescript and Express/React. Really helps us understand how to setup testing for our project
@PGBlanks
@PGBlanks 3 года назад
I was broken after they introduced this to me at bootcamp, but you helped explain it very clearly! Thank you.
@aktp4796
@aktp4796 3 года назад
At least they introduced it to you.. I’m a recent bootcamp grad currently job searching and getting back to these necessary fundamentals after realizing how ill prepared I am.
@daurham
@daurham 3 года назад
Bro SAME
@daurham
@daurham 3 года назад
Looking at the mess and I’m thinking “sooo theyre functions..? But how.. & wtf is toBe” 😂
@AnishSana
@AnishSana 4 года назад
This was such a clear and concise explanation; thank you!
@FirstLast-gk6lg
@FirstLast-gk6lg 3 года назад
Came here for a refresher, last time i wrote tests was in school and i really enjoyed them then so excited to refresh my knowledge
@JohnMitchellCalif
@JohnMitchellCalif Год назад
I'm a testing expert, and I congratulate you. Your explanation is very clear and understandable! Subscribed.
@ВладимирНетот
@ВладимирНетот 10 месяцев назад
so why the expert like you is watching tutorial for beginners?
@bama2619
@bama2619 8 месяцев назад
The video was in the search and I chose your video. I see your 4 years old video and think that you were tired at that time. In latest videos you are more energetic.). Great videos, Kyle. Thank you.
@michaelhuskey2608
@michaelhuskey2608 2 года назад
Definitely would be interested in more testing videos. A topic I only really became aware of when I started looking at job postings and my home made projects started getting more complex. Appreciate what you do!
@utkarshsingh.12
@utkarshsingh.12 Год назад
Within 14 minutes, this guy made you learn testing even if you know nothing about it. Thanks!!!
@jthomasaurus
@jthomasaurus 5 лет назад
I am very interested in more testing videos. This was a great intro for me, and I’m at that point in my self-teaching to start getting into testing my code! Look forward to more.
@WebDevSimplified
@WebDevSimplified 5 лет назад
Thank you! I would definitely recommend getting stated practicing testing since I found it was a skill that took a ton of practice for me to get good at.
@avidadedanton
@avidadedanton 3 года назад
Thanks! really nice video! *adds Test Driven Development to resume*
@DRocksRecords
@DRocksRecords 4 года назад
Dude! Test seemed like a mile away before I watch this... I get just enough of it to start trying on my own very nice... thanks
@martinag6607
@martinag6607 2 года назад
Thanks man!! Super easier to have the --coverage, super helpfull, and well explained!! Much appreciated!
@AlexGrigoreDEV
@AlexGrigoreDEV 8 месяцев назад
Very helpful, even though there's a lot more to know about JEST, it's a well rounded primer. Thank you!
@FED_workerz
@FED_workerz 8 месяцев назад
Iam watching many testing tutorial but i don't understand then i see your your testing tutorial video then i watch i understand sir teaching is good 😊
@spongebobsquarepants4576
@spongebobsquarepants4576 2 месяца назад
Very good and simple explanation. Thank you!
@hugoperez1318
@hugoperez1318 4 года назад
This was very well explained and demonstrated, great job Kyle! I think a lot of us would like at least another video going deeper into testing, explaining better practices, and whatnot. Great video, though.
@yesweet
@yesweet 5 лет назад
You are lucky if you have someone like WDS besides you, and we are lucky as we have WDS on RU-vid👏
@WebDevSimplified
@WebDevSimplified 5 лет назад
Thank you. I am planning to stick around for the long haul, so you don't have to worry about me leaving your side.
4 года назад
Amazing tutorial! I was afraid of start studying this topic because it seemed so hard. Now, this video gives me a more clear idea. Thanks!
@daviddada7771
@daviddada7771 2 года назад
You're really simplifying web development Thanks so much for this video
@cengiz-ilhan
@cengiz-ilhan 3 года назад
he is teaching everything simple. AWESOME
@deepumon.d3148
@deepumon.d3148 6 месяцев назад
Bro Thanks for this amazing video. Actually, I have to write JEST code in our organization. Your video helps me a lot. Please do more videos about JEST.
@hamed4451
@hamed4451 4 года назад
That's great kayl ... why you didnt continue this series?😟 Can you create " test(with jest) in react " tutorial series?
@abe10
@abe10 4 года назад
Yes please. More testing tutorials :(
@andylib
@andylib 3 года назад
That‘d be dope 🔥
@deansprivatearchive
@deansprivatearchive 3 года назад
kyle*
@hamed4451
@hamed4451 3 года назад
@@deansprivatearchive ooops.my bad , but take it easy :)
@connoisseurofcookies2047
@connoisseurofcookies2047 3 года назад
@@deansprivatearchive Punches drywall
@marsdwarf
@marsdwarf Год назад
Fantastic tutorial, I love that it's short. Thanks!
@DavidLeDuc1
@DavidLeDuc1 3 года назад
This is a really great intro to testing using Jest. It would good to see more testing videos, possibly ones that cover plain vanilla (no framework) javascript and testing functions that manipulate DOM.
@NiceChange
@NiceChange Год назад
i know this was posted a while ago.. but wow. creating test made so easy..Huge thanks!!!!
@vibonacci
@vibonacci 5 лет назад
I'd definitely would like a video that writes a full test suite on a small but real-life project that shows how to write proper unit tests beyond the common a + b examples.
@WebDevSimplified
@WebDevSimplified 5 лет назад
I really want to do this, but I need to find the right project first. Most of my RU-vid videos are not large enough to make a full video out of testing them.
@vibonacci
@vibonacci 5 лет назад
@@WebDevSimplified Ok. But maybe just a project where you test some very common use cases like logging in / auth, CRUD operations on a 'User' or 'Company'. Simple stuff that is very often done.
@sessionswithtemitope
@sessionswithtemitope 3 года назад
Thank you, your explanation is really simple. I hope more testing video comes up
@FelipeBarbosaGoogle
@FelipeBarbosaGoogle Год назад
Amazing job for beginners like me, thanks.
@joshr.2600
@joshr.2600 Год назад
I've watched plural sight for 1 hour. And YOU have explained this 10x better in 13 mins. U have my like n sub. If u have a paid channel. I'm ready
@mikmikmikmijtheshy8577
@mikmikmikmijtheshy8577 Год назад
You just saved my life!! Thank you!!
@nagasaran3856
@nagasaran3856 4 года назад
Good clarity is maintained throughout the video
@RogerThat902
@RogerThat902 5 лет назад
Yes, would like more testing-related videos. That was great. I think my biggest issue is knowing what exactly to prioritize when testing because as you said, you can test almost everything, even though you probably never will.
@WebDevSimplified
@WebDevSimplified 5 лет назад
I would say you should prioritize the core business logic of your code. Essentially whatever code is the most essential to your project should be tested first.
@mrCetus
@mrCetus 2 года назад
Thank you for making this video! I have been curious about automated tests but didn't know where to start. I'm highly interested in a test series💕
@masihkarimi5952
@masihkarimi5952 Год назад
Wow, that was amazing, I've got the complete concept of how the test case should look and work, Thanks for the great content Man !!
@nataliadziedzic9278
@nataliadziedzic9278 4 года назад
Thanks for this video. If you are thinking about continuing this series then I think tutorial on testing in React would be a great help for newbies ;)
@shashantr.9380
@shashantr.9380 Год назад
I really appreciate your dedication and hardwork that went into your video titled 404 Not Found (Coming Soon).
@phamlam4738
@phamlam4738 2 года назад
Thank you very much for this short video. looking forward to see more from you
@MM-hs9vp
@MM-hs9vp 3 года назад
I was thinking about unit test is so hard for me before I did it, This video makes me feel easily to against testing.Thank you !
@TremaineBuchanan
@TremaineBuchanan 4 года назад
Great video! Was very helpful in starting my journey in writing tests for my code.
@AlexTechie
@AlexTechie 5 лет назад
Great video! I've known about testing for a while, but I (personally) can't think of a place I'd use it. I know that's a me-issue; not knocking testing. Hopefully, in your next video on testing, you do can walk us through some real world use cases. Keep up the good work! 👍
@WebDevSimplified
@WebDevSimplified 5 лет назад
Testing us useful anywhere you have logic in your code. Literally anything in your code can be tested and you should definitley test the critical parts of your code
@kakitayuri
@kakitayuri 4 года назад
Really really good stuff dude! Coming from nearly a decade of professional Android development, moving to web work, I was hoping to find a succinct explanation about quick setup and coverage. Definitely a thumbs up and a sub from me. I know you're focusing on newer devs a lot, but even at the senior level needing a quick intro, very helpful stuff!
@space_monkey125
@space_monkey125 3 года назад
This is an awesome tutorial would want to see more testing tutorials
@davitdarsalia7641
@davitdarsalia7641 3 года назад
Watching in 2021 , The most useful tutorial , Thanks man!
@Jonathan_Henderson
@Jonathan_Henderson 3 года назад
Great content as always Kyle!
@aimablebancunguye9617
@aimablebancunguye9617 Год назад
Wow! you are super great, i was struggling searching for jest course. thank you for your video.
@rakanes
@rakanes 3 года назад
More!! Need a whole series, and also enzyme + jest please!
@vanessabano7180
@vanessabano7180 2 года назад
This was great! Yes, definitely more testing in JavaScript with next videos please!
@isabellebidou
@isabellebidou 3 года назад
you are so inspiring and such a great teacher! thank you for your hard work
@alexeymalakhov5244
@alexeymalakhov5244 11 месяцев назад
Damn, it looks exactly like a postman sandbox! Clean and functional! I like this kind of automation
@ahnaffaiyaz1892
@ahnaffaiyaz1892 2 года назад
Great explanation, thank you very much.
@mohamedelidrissi2839
@mohamedelidrissi2839 5 лет назад
Just came across this channel, not disappointed!
@WebDevSimplified
@WebDevSimplified 5 лет назад
Thank you! I hope you enjoy the rest of my content just as much.
@vanlifecara
@vanlifecara Год назад
I'm in QA and just learning JavaScript but need to learn Jest for work, this was very helpful
@maxiequa567
@maxiequa567 5 лет назад
And now we understand Jest, thank you Kyle! +1 for more testing videos.
@WebDevSimplified
@WebDevSimplified 5 лет назад
I'm really glad you enjoyed it. I can't wait to make more testing video.
@maxiequa567
@maxiequa567 5 лет назад
@@WebDevSimplified You really do simplify development for the web! Have already learned so many new and practical nuggets of wisdom. Where do you/have you gained your knowledge from? Are there any resources (other than your awesome videos) you would suggest ?
@WebDevSimplified
@WebDevSimplified 5 лет назад
@@maxiequa567 I learned nearly everything I know about web development from RU-vid videos, personal projects, and my job. I also read a lot of blogs/articles for more concept based things like writing clean code and testing.
@maxiequa567
@maxiequa567 5 лет назад
@@WebDevSimplified Amazing. Do you have any blog recommendations?
@WebDevSimplified
@WebDevSimplified 5 лет назад
@@maxiequa567 Not really. I usually just google search for what I am looking for and read whatever blog comes up.
@maheshr5282
@maheshr5282 2 года назад
The explanation was clear and upto the point. Thank you so much for the video.
@semtristan3170
@semtristan3170 2 года назад
Thank you for this!! I had a complete brain fart, I subscribed because I will be back!!
@JohnAussieMate
@JohnAussieMate 4 года назад
Thanks Kyle, You are really helpful with your videos, great content, well paced and I love the simplicity of how you make something complicated look simplified. And yes, I would love more videos on testing, I believe it to be necessary and a must for every developer out there. Thanks again mate!
@kostiantynkarzhanov9216
@kostiantynkarzhanov9216 Год назад
Thank you! Very clear and concise explanation! 💛
@rafay9254
@rafay9254 4 года назад
Thank you! I love the way you explain everything
@supriyantapoddar6129
@supriyantapoddar6129 5 лет назад
Want more advance testing videos. Your videos help us a lot. Thanks a ton!
@WebDevSimplified
@WebDevSimplified 5 лет назад
Thanks! I hope to explore more testing videos in the future for sure.
@okopyl
@okopyl Год назад
Could you please record a video on how to test React's components? And also it would be cool if you could make a video o how to install Jest to Vite's project. I did it, but it was quite a headache - no tutorials were working, I had to google a lot of errors and fix them by myself...
@hamzahahmad1670
@hamzahahmad1670 4 года назад
Quality content, as usual. Thank you. If possible, it would be great to see some React testing as well.
@stith_pragya
@stith_pragya Год назад
Thanks Bro for the video...........🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻
@filemomb984
@filemomb984 5 лет назад
Man, thank you a lot, yours tutorials are incredible!! Congrats!!
@WebDevSimplified
@WebDevSimplified 5 лет назад
Thank you!
@Cadambank
@Cadambank 2 года назад
I would also like to see more about testing.
@GusNando
@GusNando 2 года назад
Thanks kyle, 😁 easy to understand for beginner like me
@ValchyGaming
@ValchyGaming 2 года назад
This video makes me feel productive
@sarfarazsheikh7378
@sarfarazsheikh7378 2 года назад
Thank You Very Much Sir
@MoMoneyMoritz
@MoMoneyMoritz 2 года назад
Thanks man, this was very helpful :)
@nidheeshpv8300
@nidheeshpv8300 3 года назад
Dude, awesome! Thanks a lot. 💕💕
@xenialxerous2441
@xenialxerous2441 4 года назад
Hey Kyle! I know it's a bit late to post a question/comment for this video(considering the date of publish for the video) nevertheless, I have been watching your tuts and coding videos and I genuinely enjoy watching your videos and learn a ton of new things and concepts. I particularly love the specific topics like regex, testing, solid principles etc that you cover, which frankly I didn't came across on most other coding pros' channels. I love these indepth programming topics by the way and hence, it automatically draws me to your channel every now and then. Main question I had was, "what could be the main difference between a normal software(app) testing and the full on Pentesting?".. Generally, I am aware of the definitions and the underlying principles but, I am quite assured that, your answer would defnitely shed some more light on the topics and help me go further in these topics. Thanks for everything, and love you!
@KINGQABIL
@KINGQABIL 2 года назад
Thanks, man Your explanation is another level bro
@Zen-lz1hc
@Zen-lz1hc 2 года назад
Like Cool simple introduction to Jest Thank You :)
@31grimey
@31grimey 4 года назад
Amazing video Kyle. Can you do a video about testing React with Enzyme?
@wepranaga
@wepranaga 4 года назад
this guy is always make things easier
@Pareshbpatel
@Pareshbpatel 2 года назад
Excellent Tutorial on testing JS with Jest. Thanks, Kyle. {2021-11-08}
@divyanthj
@divyanthj Год назад
This covers the basics but how do you test an existing react app? How does one figure out WHAT to test in a react app?
@schoolboost
@schoolboost 3 года назад
I would love to see more testing Videos
@Any_key404
@Any_key404 5 лет назад
I just recently learned unit testing with Jasmine, I’m glad to see someone teaching this as I had to basically accidentally bump into it myself.
@WebDevSimplified
@WebDevSimplified 5 лет назад
Nice! I am hoping to include some more testing into my future videos since I find it enjoyable.
@alistokes2308
@alistokes2308 3 года назад
Thank you for the info! This was really concise, and perfectly helped me figure out this stuff.
@RayPereda68
@RayPereda68 4 года назад
Helpful video. Please create more testing videos. In particular, snapshot-based testing would be of interest.
@cephoenix
@cephoenix Год назад
Thanks bro! Helped a lot!!!
@codewithhyder1553
@codewithhyder1553 Год назад
great brother , it helped me 100%
@stanleyagwu4818
@stanleyagwu4818 3 года назад
Thanks so much. You are, and have been doing a great job for us! More grace!!!
@metagamingOficial
@metagamingOficial 4 года назад
Thanks Kyle, that was a nice start =)
@nerdiloo9863
@nerdiloo9863 4 года назад
I admit I don't unit test much but I'll give this a go - i like the console and html output
@omar_calderon
@omar_calderon 3 года назад
Thanks, your explication is easy
@terenceroberts5240
@terenceroberts5240 3 года назад
Another Excellent Video.
@peytoncastillo4508
@peytoncastillo4508 2 года назад
🥳very helpful thank you!
@SohailKhan-gu2du
@SohailKhan-gu2du 3 года назад
Thanks man ❤️.. Helped a lot... Please create testing videos for entire react and node-express application with best practices ❤️... Lots of love brother.. Great work ❤️
@MegaVladikslavman
@MegaVladikslavman 2 года назад
Thank you a lot for your explanations! Reaslly find them very useful for me!
@alpachino468
@alpachino468 3 года назад
I wish I had even just a fraction of your skill and knowledge...
Далее
JavaScript Unit Testing Tutorial for Beginners
48:32
Просмотров 72 тыс.
TRENDNI BOMBASI💣🔥 LADA
00:28
Просмотров 695 тыс.
PERFECT PITCH FILTER.. (CR7 EDITION) 🙈😅
00:21
Просмотров 3,4 млн
Why Vitest Is Better Than Jest
13:13
Просмотров 136 тыс.
Thoughts About Unit Testing | Prime Reacts
11:21
Просмотров 226 тыс.
The Most Important Skill You Never Learned
34:56
Просмотров 208 тыс.
Mocking a Database in Node with Jest
13:29
Просмотров 67 тыс.
Mocking Asynchronous Functions with Jest
21:50
Просмотров 71 тыс.
Stop Writing So Many Tests
10:02
Просмотров 91 тыс.