Learning Unit Testing with Jasmine
54mIntermediate2021-09-02
Authors

Dylan Israel
Engineer, Mentor, and Educator
Course details
Unit tests are the foundation of programming tests, the piece you should build before you create other kinds of tests or even your core code. This course gives you a guided tour with hands-on practice of Jasmine, the most widely used JavaScript unit testing tool. Instructor Dylan Israel shows you how to set up Jasmine, group your tests, and write your first test. Dylan walks through using beforeEach to configure your tests, being able to focus down or skip a test for a short period of time, and being able to listen to what happens with each third-party resource that you use. Dylan concludes with a discussion of mocks that mimic a core dependency and some less-common matchers.
Skills covered
JasmineJavaScript FrameworksSoftware TestingWeb DevelopmentOpen SourceSoftware DevelopmentDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Learning unit testing with Jasmine
- 02 - Prerequisite knowledge
1. Setting Up Jasmine
- 03 - Setting up Jasmine from scratch
- 04 - Arrange, act, and assert pattern
- 05 - Grouping with describe()
- 06 - Challenge - Grouping with describe()
- 07 - Your first test
- 08 - Challenge - Your first test
2. Data Setup
- 09 - Data setup with beforeEach
- 10 - Challenge - Data setup with beforeEach
- 11 - Skipping and focusing introduction
- 12 - Challenge - Skipping and focusing introduction
- 13 - Spies
- 14 - Challenge - Spies
- 15 - Mocks
- 16 - Challenge - Mocks
- 17 - Additional matchers
- 18 - Challenge - Additional matchers
3. Moving Forward
- 19 - Final challenge
- 20 - What's next
Related courses
- Angular: Building Large Applications
- Testing React Applications with Jest and React Testing Library
- Building a Reactive App with Angular and Spring Boot 2
- AI-Powered Software Development: Coding, Testing, and System Design
- Software Testing: Tools
- Java for All Platforms: Desktop, Web, and Mobile Development
- Introducing Functional Programming in C++
- Android Compose with Kotlin