JavaScript Unit Testing Tutorial for Beginners
ฝัง
- เผยแพร่เมื่อ 13 ก.ค. 2024
- Write bulletproof JavaScript code with unit testing! 💪 This beginner-friendly tutorial will teach you the essentials for cleaner, more reliable apps.
Key benefits of unit testing:
- Catch bugs early in development
- Boost confidence in your code
- Write better, more maintainable JavaScript
🚀 Want more?
- Check out my full JavaScript Unit Testing Course: bit.ly/javascript-unit-testing
- Subscribe for more videos like this: goo.gl/6PYaGF
✋ Stay connected for updates and exclusive content! Follow me on:
- Twitter: / moshhamedani
- Facebook: / programmingwithmosh
- Instagram: / codewithmosh.official
- LinkedIn: / codewithmosh
📖 TABLE OF CONTENT
0:00:00 Course Intro
0:01:21 Prerequisites
0:02:01 Course Structure
0:04:16 How to Take This Course
0:05:14 Setting Up the Testing Environment
0:05:46 Starter Project
0:06:40 Introduction to Unit Testing
0:08:19 What is Unit Testing?
0:13:39 Types of Tests
0:16:53 Choosing a Testing Framework
0:18:31 Setting Up Vitest
0:19:44 Writing Your First Test
0:29:04 Exercise: Testing fizzBuzz
0:35:00 Test-Driven Development
0:42:10 Exercise: Testing Factorial
#javascript #testing
🚀 Want more?
- Check out my full JavaScript Unit Testing Course: bit.ly/javascript-unit-testing
- Subscribe for more videos like this: goo.gl/6PYaGF
Hello Mosh, I am trying to use this as a baseline to try some of my own js unittest. but I am meeting an issue of initializing when i try to define a custom class in one of the .js files then importing it. Do you have an idea what is causing this issue?
no
Mosh sir i started coding by seeing you are my inpiration i hope you keep teaching and make others life better
Not right
Thanks a million for the effort you made, Mosh!
I’m learning Full-Stack development with your Clear & concise TH-cam videos.
This would be a great and useful course!💥🔥
دمت گرم داری!❤️
Thank you for teaching us all these years!! I come from non-cs background but now I have been working as a software developer for 2 years. Your videos have helped me a lot at work as it helps me being able to learn new languages/concepts quickly !! Thank you!
I’m still waiting for your flutter course mosh …. You promised it since the react native course
Me too broo
Me tooo 😅 Let's Blow up this comment 🎉
Me too!
Flutter sukcs better focus on fp-ts lib.
No he didn't
This is the info that I was looking for! Thank you very much. I didn't know anything about testing, but with this video I learnt a lot!! The explanation was very clear and straightforward. Thanks again!!
Thank you thank you thank you
Ben waiting for this 🥺❤️❤️
Thank You! For Your Service! You are a Noce Person Dear Mosh Keep it up
This man really does cool things. Thanks to him, I started making videos myself. I wish good luck to everyone who is learning. May everything work out for you 💪
Thank you so much mosh . Still learning from you 😉
Thanks Mosh, we love youuuuu
Mosh you are my model to be inspired
It's good to see you back
But i was really excited to learn more about mechine learning. Please try to do more about it.❤
I have started learning your React course. That course is osum i have never seen any instructed like you. You are making the coding as fun and also real world examples and projects. That's why everyone likes your style of teaching. But i have one doubt when you're gonna release part 3 of the ultimate react series. Eagerly waiting for that. Anyway thank you❤.
Thanks so much for this course Mosh, you should also prepare one course on integration testing and testing react apps
Excellent video, very well done!
best course ever
Thanks Mosh!
Yay, Mosh is back !!!!
Thanks Mosh
Thank you so much :)
I learned SQL with your content and I was able to land my first engineering position as a junior SRE ❤ thanks for sharing such valuable content.
What does your work mostly consists of ?
This is the one thing I struggle with the most. I'm so excited for thjs
love you mosh
thankyou very much sir :)
You're doing amazing.
Love from Iran😍
Ur just awesome
amazing!!!! پرچم همدان بالاست
We have been waiting for this course for a long time 😁
Mosh please your flutter course
Hi Mosh
Great tutorial as always Mosh! If anyone’s looking for more JavaScript tutorials, we’ve released JS logging in Winston and Pino to help the community too 💪
Mosh is back 💯💯💯
Waiting ❤
Your tutorials are amazing. Can you do one for Software testing?
Mosh Sir I beacame a fan of your teaching. Kindly create a course for Flask Framework and Fast API
This is a humble request for making a playlist for Docker and AWS. Thanks in advance.
Mosh Please upload project base courses on your websites, also courses on AWS
Mosh will there be a new react native course? Appreciate your hard work
Flutter course please
Love u from the core of my fucking body cells. Im turned into a usd printing machine since I have become a react developer after I started learning to code using ur cources. Hope to see u in paradise in the other world Mosh❤🎉
OMG, You are getting younger day by day.
However, sir you are an amazing teacher.
Hi mosh it would be greatful if you create a course on Machine learning. There is no clear path im seeing, i want the course like how you package things everything as one go ive purchased your react course its great everything is packaged very well. Kindy please consider this request.
I was about to learn Jest when I switched to wordpress since it appears that it's the only way to get a job as a junior.
Flutter Mosh Please ❤
Waiting for the react testing course ❤
Hey, can you tell me what theme you are using?
Btw, loved your video :)
دمت گرم
Mosh sir, can you please do a comprehensive course on Springboot. Please, its a must after your Java course. Thanks.
I’m a beginner but want to eventually learn how to make my own daily planner mobile app that can be used on Android & iOS. I’ve been watching some of your videos and I love your teaching style. I’ve paid for the All Access Pass on your website but don’t know where to start. What languages should I learn to build my app?
JavaScript
Hi mosh
Are there any discounts available for your monthly all course subscription?
Mosh it's amazing watching your tutorials, I've learned a lot from you, can you please share your bashrc file with me.
Sir i have been asking for many months for a Complete DSA course using Javascript
He already published a DSA course using Java they is no need i guess. Don't be married to the languages my thought
Hi mosh, Thanks to you for your videos.
I from Iran and want to join coding world. But honestly I don't know with coding language is suitable for me.
I like mobile app creating but I don't have any idea if the job market good or not.
Can you please help me take the first step?
Sir Mosh can you please make a one huge project on JavaScript that covers every things like DOM, async, await and promises ,events and many more things.
Hello Mosh, the course 'Angular 4: Beginner to Pro' can not be loaded. Could you check it?
Plz give us a tutorial about asynchronous JavaScript
Hi, Which extensions are you using? if anyone know please do share.
Which vs code theme you used??
Dang, u really know what your fans want
Hey mosh, Is it possible for you to create a NodeJS course with typescript and nest?
I mean the nodejs full course is already awesome. But it could be much much better if you add these mastersy topics as well.
Great suggestion!
@programmingwithmosh can you please make a course on system design
Pls add course for ci/cd and docker for frontemd devs
Pls upload JavaScript full tutorial video
Flutter course would be a killer
Please make a AIML course please
please i need full course thanks
Is there a translation of the video into Arabic on your platform? I want to take the Django course???
This 40 mins was worth watching
Is spring boot still in demand in 2024. If yes Sir Mosh can we get a dedicated course on this topic. Please..!!!🙏
Windows vs macOS vs Linux for programming, which do you use and why?
❤❤❤❤❤❤
do you recommend vue js or react for beginners?
Both are great.
But you have to make your choice between the two based on the demand in the market you are targeting.
react next
But Mosh, how can I write tests for tests?
hello Mosh sir i want to buy your course online but my card and country dosent support international transaction. ill like to know if i can buy the course with crypto currency i really need a fast reply from you sir.
You lost me on the "terminal" part... what terminal ? If it's on VS Code, it return an error 😥
I think this course is mine.
هل يوجد في منصتكم خاصيه الترجمه للغه العربيه
Bro, I'm confused I watched the 48 minutes to learn JavaScript for beginners, i need practical videos to get me an examples from the practical life , to get me better to work as a frontend developer, please can you guide me I'm lost
Micro services course using nodejs. 😢😢
Your test are only testing the good cases. What about if a new dev uses those functions that expect numbers but pass an array, string, an object, or something else? I agree with not over-engineering but this is still an issue with Unit test. They give a sense that the code is good but do not always make sure your code will not have bugs.
I’ve covered those in the full course.
How can subscribe with my Nigerian master card on your website, pls i really need this. Pls any discount, exchange rate is really high for a dollar to a naira
I just missed the early price 😅
Is this beginners course, you need to really check the Java unit testing because when it come down to Fizz Buzz im getting fail test, im copy everything you did, and it feel like my money is wasted. No type of contact, I feel this is a scam😢
Hey mosh let's talk business
I too want to earn like you ... can you please guide me sir.. I lost job when my father heard it he got heart attack and he passed away.. now my mother also not well... no job for more than 6 months ... please guide me sir I am now in a small town and less awareness and less money to thing about that is next in my life...
you talk much about what you will do and actually does less.
Waste of time. This is not for beginners, this is for illiterates.
after i finish intro.test.js i go to my terminal and type npm t i get this error: Failed to load url ../src/intro (resolved id: ../src/intro) in C:/Users/snaus/javascript-testing-starter/src/tests/intro.test.js. Does the file exist? please help[
hello Mosh sir i want to buy your course online but my card and country dosent support international transaction. ill like to know if i can buy the course with crypto currency i really need a fast reply from you sir.