JavaScript Unit Testing - The Practical Guide
What you'll 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
Requirements
- Basic JavaScript knowledge is required
- NO prior testing knowledge is necessary at all
Description
Automated testing is a key concept in modern (web) development.
Yet 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 will teach 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
Who this course is for:
- JavaScript developers who want to add tests to their projects
- Developers who always considered automated testing to be intimidating
Instructors
Bundling the courses and know how of successful instructors, Academind strives to deliver high quality online education.
Online Education, Real-Life Success - that's what Academind stands for. Learn topics like web development, data analyses and more in a fun and engaging way.
We've taught more than 2,000,000 students on a broad variety of topics. We'd love to teach you as well! :)
Keep learning!
Experience as (Web) Developer
Starting out at the age of 12 I never stopped learning new programming skills and languages. Early I started creating websites for friends and just for fun as well. Besides web development I also explored Python and other non-web-only languages. This passion has since lasted and lead to my decision of working as a freelance web developer and consultant. The success and fun I have in this job is immense and really keeps that passion burningly alive.
Starting web development on the backend (PHP with Laravel, NodeJS, Python) I also became more and more of a frontend developer using modern frameworks like React, Angular or VueJS in a lot of projects. I love both worlds nowadays!
I also build full-stack applications and acquired expert DevOps and cloud computing knowledge - proven by the many AWS certifications I hold (incl. the top-level Solutions Architect Professional certification).
As a self-taught developer I had the chance to broaden my horizon by studying Business Administration where I hold a Master's degree. That enabled me to work in a major strategy consultancy as well as a bank. While learning, that I enjoy development more than these fields, the time in this sector greatly improved my overall experience and skills.
Experience as Instructor
As a self-taught professional I really know the hard parts and the difficult topics when learning new or improving on already-known languages. This background and experience enables me to focus on the most relevant key concepts and topics. My track record of many 5-star rated courses and more than 2,000,000 students on Udemy is the best proof for that.
Whether working as development instructor or teaching Business Administration I always received great feedback. The most rewarding experience is to see how people find new, better jobs, build awesome web applications, acquire amazing projects or simply enjoy their hobby with the help of my content.
Together with Manuel Lorenz, I founded Academind to offer the best possible learning experience to our more than 2,000,000 students.