JavaScript Unit Testing - The Practical Guide

Learn how to write automated tests (unit & integration tests) for your JavaScript projects with Vitest & Jest.

4.65 (3312 reviews)
Udemy
platform
English
language
Software Testing
category
JavaScript Unit Testing - The Practical Guide
23,575
students
5.5 hours
content
Jan 2024
last update
$99.99
regular price

What you will learn

Write and structure unit & integration tests

Remove side effects from tests via mocking and spies

Work with popular JavaScript test runners and libraries

Write good tests and focus on testing core business logic

Why take this course?

Automated testing is a key concept in modern (web) development.

It is a concept that can be intimidating at first, hence many developers shy away from diving into testing and adding tests to their projects.

This course teaches you automated unit & integration testing with JavaScript from the ground up. You will learn how tests are written and added to your projects, what should (and should not) be tested and how you can test both simple as well as more complex code.

You will learn about the software and setup required to write automated tests and example projects will be provided as part of the course. It's a hands-on, practical course, hence you won't get stuck in theory - instead you'll be able to learn all key concepts at real examples.

In the course, Vitest will be used as the main testing library & tool. It's a modern JavaScript test runner and assertion library that provides Jest compatibility. Hence what you'll learn in this course will help you no matter if you're working with Vitest or Jest. And the core concepts will apply, no matter which testing setup you're using at all!

As part of this course, typical testing problems will be defined and solved and common strategies like mocking or working with spies are taught in great detail. This course also does not focus on specific types of JavaScript projects - neither does it focus on any specific library or framework.

Instead, you'll learn how to automatically test your (vanilla) JavaScript code, no matter if it's a NodeJS or frontend project. The fundamentals you'll gain in this course will help you in all your future projects - backend (NodeJS) and frontend (vanilla JS, React, Vue, Angular) alike.

This course will provide you with an extremely solid foundation to build up on, such that you can start adding tests to all your JavaScript projects.

In detail, this course will teach you:

  • What exactly "testing" or "automated testing" is (and why you need it)

  • What "unit testing" is specifically

  • Which tools you need to enable automated unit tests in your projects

  • How to write unit tests

  • How to get started with integration tests

  • How to formulate different expectations (assertions)

  • Which patterns to follow when writing tests

  • How to test asynchronous and synchronous code

  • How to deal with side effects with help of spies & mocks

  • How to apply all these concepts in real projects & examples

Screenshots

JavaScript Unit Testing - The Practical Guide - Screenshot_01JavaScript Unit Testing - The Practical Guide - Screenshot_02JavaScript Unit Testing - The Practical Guide - Screenshot_03JavaScript Unit Testing - The Practical Guide - Screenshot_04

Reviews

Nilotpal
May 11, 2023
learning this course having so much excitement and affection to know the things which might help me later to build entire app on my own.
Erik
May 9, 2023
Missing how to test some work with db in nodeJS. Whether to mock it like text files or fetch/axios or to run it. + missing typescript testing event it's not expected in this course according to the name of the course.
Mohammed
May 7, 2023
it was very good , but i expected also it should include ts and also a beginner chapter for using testing with any big framework ex:reactjs
Lucas
April 22, 2023
Já fiz vários cursos do Max e é sempre uma experiência boa porque ele tem uma ótima didática e as aulas são interessantes. Até pessoas com dificuldade com atenção conseguem ver as aulas até o final e compreender tudo. Mas atenção: o curso é todo em inglês. As legendas (também em inglês) e a boa pronúncia do Max ajudam, mas é preciso saber inglês.
Whoong
April 22, 2023
Everything about this testing course is very comprehensive and up to date. Many concepts were taught (such as AAA), and I wonderfully enjoyed learning them. Now, I do think I can finally write some decent unit testing through practice and constant referring back to this course.
Muhammad
April 18, 2023
This course should give you a solid foundation for testing as a whole and unit and integration testing in particular, and of course, Max did a great job as usual.
Dimitrios
April 13, 2023
Easy to follow course with many different examples. I immediately started to use the knowledge in order to unit test successfully a NodeJS Azure Function with Jest.
Barak
April 11, 2023
Max is one of the best teachers on Udemy and online in my eyes. His lectures has the best structure and he is very good in explaining his logic. It's nice to have full comprehensive courses and not the regular "Learn X in Y" formula. Its slow and boring but that's the way to success :)
Loc
April 6, 2023
Too basic, with poor content about unit testing and integration testing. The course should be named "Vitest for Javascript". Such a waste of time and money for anyone really wants to dive deep into unit testing.
Pablo
April 5, 2023
Perfect length, level of detail and topics covered. Academind is always trustworthy. I can't wait to dive deeper into testing with other frameworks
WAN
March 27, 2023
This course provided us basic knowledge on unit testing and it uses Vitest library which is quite the latest library in unit testing. Even ChatGPT doesn't know about it yet. Overall, it's been a great course. I now understand about unit testing methodology, the thought process that should go in crafting test cases and all the creativity that might be required to make sure that your tests run without any side effects.
Gary
March 20, 2023
Fantastic course it was everything I had hoped and more and I'm excited to apply what I learned in my projects. I'd recommend this course to anyone looking to learn about unit testing !
Gabriel
March 20, 2023
Hands down the best code testing course I've ever seen. Difficult concepts explained in an easy and practical way.
Haseeb
March 15, 2023
it is a very good course, it explains the overwelmming concepts of testing in a very easy to understand way. Many new dev just start to just copy and paste or pretend to know about testing, and that is why they strugle. I was in the same situation, but this course clarifies the concepts of testing.
ANA
March 14, 2023
I really recommend this course because it helps understanding why and how we should test. It gives really helpful recommendations and key points and it made me solve several problems that I had when testing.

Charts

Price

JavaScript Unit Testing - The Practical Guide - Price chart

Rating

JavaScript Unit Testing - The Practical Guide - Ratings chart

Enrollment distribution

JavaScript Unit Testing - The Practical Guide - Distribution chart

Related Topics

4649166
udemy ID
4/19/2022
course created date
5/3/2022
course indexed date
Bot
course submited by