JavaScript testing – i.e. unit tests, integration tests and e2e (UI) tests – can be intimidating. It shouldn’t be! This video guides you through all the basics (including the “Why”?) of JavaScript testing. Master JavaScript testing now!
Master JavaScript: https://acad.link/js
Master ES6: https://acad.link/es6
———-
Read the full article that belongs to the video: https://academind.com/learn/javascript/javascript-testing-introduction/
Starting source code: https://github.com/academind/js-testing-introduction/tree/starting-setup
Source code after unit test: https://github.com/academind/js-testing-introduction/tree/unit-tests
Source code after integration test: https://github.com/academind/js-testing-introduction/tree/integration-test
Source code after e2e test: https://github.com/academind/js-testing-introduction/tree/e2e-test
Want to learn something totally different? Check out all other courses: https://academind.com/learn/our-courses
———-
• You can follow Max on Twitter (@maxedapps).
• And you should of course also follow @academind_real.
• You can also find us on Facebook.(https://www.facebook.com/academindchannel/)
• Or visit our Website (https://www.academind.com) and subscribe to our newsletter!
See you in the videos!
———-
Academind is your source for online education in the areas of web development, frontend web development, backend web development, programming, coding and data science! No matter if you are looking for a tutorial, a course, a crash course, an introduction, an online tutorial or any related video, we try our best to offer you the content you are looking for. Our topics include Angular, React, Vue, Html, CSS, JavaScript, TypeScript, Redux, Nuxt.js, RxJs, Bootstrap, Laravel, Node.js, Progressive Web Apps (PWA), Ionic, React Native, Regular Expressions (RegEx), Stencil, Power BI, Amazon Web Services (AWS), Firebase or other topics, make sure to have a look at this channel or at academind.com to find the learning resource of your choice!
Original source
38 responses to “JavaScript Testing Introduction Tutorial – Unit Tests, Integration Tests & e2e Tests”
Max, I guess it would be a great idea to create a full course about testing, maybe using TDD, some React testing and so on. This is a course I wanna see from you so much and I hope, that one day it will become true 😉
Your videos are great! Very often use them to learn/refresh/structure information. Thank you very much for your work!
Is there a course where you address all three types of tests?
google. I searched chai tutorial, and it gave me jest tutorial. wtf
This is a really great video! Thank you so much!
TypeError: generateText is not a function
Awesome 🙂
Tests are not that scary after watching your video.
If you are dealing with a web application, you will have a lot of E2E tests. Think about all the tests dealing with signing in, going to a page and confirm some type of interaction with the page works.
Didn't know Seth Rogen was so good at teaching
where the package.json file?
thank you so much sir! 🙂
love your tutorial. straight to the point. no time wasted. super duper good knowledge.
Which IDE and plugins are you using for IntelliSense / Autocomplete and showing library function documentation?
Really high quality video – both the content and the form (some graphs when needed, some code when needed). Thanks!
awesome stuff as usual.
Wish I could like this vid 10 times
Incredibly well explained. Thanks a ton!
TU (Thumbs Up, Thank You, THE Ultimate) !
Remark to readers: This of course is only an introduction about testing and not about TEST DRIVEN development, perhaps you can add a remark at the end of the vid saying that.
Thank you for this video. Do you have a course on testing
you made testing look so damn easy…i love it and want dive deep into testing !!…thank you very much sir
amazing video !!!!!!!!!!!!
Hey Max great vid man, the methods you use in page.click throws an error. Tried to use select, yet get an error too. Any ideas? Thank you. :Edit you have to add page.waitForNavigation() before you initialize navigation.
I would say for every developer:
"The most valuable courses you can see here on Academind"
Thanks a lot Max 🙂
Thank you, it was another awesome tutorial 🙂
When I following your steps I stucked with installing puppeteer on my machine because of my company
SSL Certificate restriction, I'm using windows 10. Little bit searching (Soon my company will make me DevOps lol) I found solution like "npm config set puppeteer_skip_chromium_download true" then "npm install puppeteer –unsafe-perm=true". After that I used const browser = await puppeteer.launch({executablePath: 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'});
Maybe it can help those who have the same problem as me.
Note: npm install puppeteer –unsafe-perm=true in this line, I'm not sure if it's necessary and I don't know any safety issue in that.
Absolutely great video. Thanks a lot!
Cool tutorial! I just wanted to learn testing and found your tuts.
which syntax highlighting extension do you use for vsc?
i get bored whenever you start installing tools to make small things, we as beginners can't follow, am not learning anything from this videos 👌
Can Puppeteer also be used in a training mode to capture user clicks and input as js test code statements writing them into a given test function? Or which other free tool could help here?
Thank you very much for sharing. Very educational
The best:))
I like how you explain the Unit testing, nice video!
Now I am wondering why did I chose Web Development lol too many stacks, too many frameworks, too many packs, too many unit testing… Now we don't have time to code because we need to setup environments and test, test, test… Its like 50% coding time 😛
Thank you, man! It helped me a lot!
really cool and useful! Thanks!
Brilliant! Thank you 🙂
I'm really impressed each time I'm looking for new things or concept to understand and explore because I'll always find you either on udemy or youtube video answering questions I've been asking myself about some vocabulary point I did get quite well.
For couples of weeks, I've been trying to understand :
– testing,
– thinking about when and where to add typescript and what to test ( as working with jest we should only assert output instead of type, which typescript should do instead I reckon )
– that there were few kinds of testing,
– that actually I was not grasping the difference between unit testing, functional testing, integration testing and where was E2E in all that ( ends up with E2E was actually functional testing ( and not hard-related to test one function ), unit test was actually this kind of test where you actually test one function ) , then got lost with integration test.
Your explanation was confirming some though and also made me understand better what was integration tests : testing function with other dependencies ( == other functions ).
Can't wait to go deeper and make it to the tests automation.
Thanks again for your explanation
Can we use puppeteer with react native? if so then how?
What IDE do u use?