Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

How to Write Unit Tests - Unit Testing Tutorial

Scrimba via YouTube

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This beginner tutorial introduces unit testing with Jasmine, covering test structure, grouping, setup, focused and skipped tests, spies, mocks, debugging, and matchers through coding challenges.

Syllabus

- Introduction to Unit Testing
- Introduction to Jasmine
- Setting up Jasmine from scratch
- Understanding the three parts of testing
- Testing setup breakdown
- Grouping with describe
- Grouping with describe - code challenge
- Our first test
- Our first test - code challenge
- Setting up data with beforeEach
- Setting up data with beforeEach - code challenge
- Skipping and Focussing introduction
- Skipping and Focussing - code challenge
- Unit Testing spies! ️
- Spies - code challenge
- Mocks and debug with me!
- Mocks - code challenge
- Additional matchers: toBeDefined and toEqual
- Additional matchers - code challenge
- Final code challenge
- Unit Testing Outro

Taught by

Scrimba

Reviews

Start your review of How to Write Unit Tests - Unit Testing Tutorial

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.