Introduction to Jest Testing | JavaScript Unit Tests

preview_player
Показать описание

In this Introduction to Jest testing, you will learn how to write JavaScript Unit Tests and why you should write them. Jest is a popular testing framework that helps you verify your code works like you think it should.

⭐ Become a full-stack web dev with Zero To Mastery Courses:

👇 Follow Me On Social Media:

Introduction to Jest Testing | JavaScript Unit Tests

(00:00) Intro
(00:10) Welcome
(00:32) Lesson Goal
(00:51) Why Write Tests?
(01:24) Quick Note
(01:42) Install Node for npm
(02:04) Checking your Node install
(02:39) A Simple Function
(03:15) Install Jest
(04:24) Your First Unit Test
(05:42) How to Run Tests
(06:41) What is a Unit Test?
(07:14) Testing a 2nd Function
(12:07) Testing a 3rd Function
(16:09) Drilling Down to a Single Responsibility
(22:25) Generating a Coverage Report
(24:40) Wrap up

📚 Tutorial References:

Was this tutorial about writing JavaScript Unit Testing with Jest helpful? If so, please share. Let me know your thoughts in the comments.

#jest #testing #javascript
Рекомендации по теме
Комментарии
Автор

Been using Jest testing for web applications for almost 6 months and one thing that i´ve noticed on the web was the lack of a well structured tutorial about software testing and more specifically Jest Testing.
So thank you Dave for the amazing content.
Looking forward for a further chapters of this educational content.

sandroffdsantos
Автор

Wow, I can't express how excited I am to see you've started a testing tutorial series! 🙌 I've been looking forward to learning more about testing for quite a while, and your videos are just what I needed.

chiragchhajed
Автор

Much needed video, please cover unit testing, integration testing, End to end testing, React test library, Cypress

TonyStark
Автор

After a one year programming break, I really needed this playlist. I already knew all of them, but this was the best refresher I needed. Clean, short and very easy to understand. Please keep up the good work and continue making youtube videos!!!

mihaivisovan
Автор

Hello my friend,
I don't do testing very often due to very strict deadlines, but it's always good to do so,

8:30 since we're passing an empty string to the join method no commas will be created, on the other hand, passing nothing(undefined) will add commas,

Thanks Dave!

ahmad-murery
Автор

Thank you so much. I have no words to appreciate the way you teach.

won't include the commas. So we won't need the replaceAll part. I know you know this, but you just came up with a quick solution. Mentioned it for the viewers.

codersdance
Автор

pls, continue this. thank you again, Dave.

mrbilchalan
Автор

Real nice! Thanks. I will add the tests when the strings are null or undefined.

LorenzoJimenez
Автор

Oh thank you for this series. I can't wait for you to get to the advanced testing such as making network requests, redux, axios interceptors and watching every testing video you are making....

omidoyinayodeji
Автор

Awesome intro to unit testing with jest. We use jest extensively at my job. This is a great way to get back to basics, understand how jest integrates with npm, and how to use it to write better code!

OpossumPiper
Автор

Great video, I like how you use non trival examples and work in clean code principles.

rdubb
Автор

Cannot wait to see the content about cypress vs jest, and when we need to use them. Lovely.

frankkim
Автор

I am sure you get a million requests for topics, but could you please do a data structures and algos course? Basic linked lists, trees and graphs, big O, recursion etc. Your explanations are so in depth and helpful. I would love to see a dsa playlist at some point. Forgive me if you have this and I just have not found it yet.

stevieholland
Автор

Didn't see that comming.
Excited for this series

md-abid-hussain
Автор

Thanks Dave, you've really helped on my Javascript journey i do really appreciate... I wish you could talk about getting a job, cause i feel I've been writing codes for myself, but all same thanks alot

crixcodex
Автор

I just started testing for an e-commerce web app created with next js and typescript
i had hard time configuring jest and typescript for unit and component testing
but setup cypress pretty easily
i hope this video help me understand jest and testing better
thank you Dave for great content

alirezagarshasbi
Автор

nice intro to jest thank you, excited to integrate this into my Next.js app

MichaelShingo
Автор

I have just finished a 3 hours long Cypress tutorial with E2E and Component testing. Let's see what Jest brings us =)) Thank you Dave!

bugraotken
Автор

Sir please make a video on how to test the react component which includes redux, custom hooks with mock api...I mean to test complex react components

shubhamgupta-bltr
Автор

Seriously, Dave! Thank you so much for doing this! Your channel as really helped me grow and progress within my journey! I've been trying to find some content creator that would create content solely for JEST! Thank you so much!

ichiroutakashima
join shbcf.ru