Course “JS: Advanced Testing”

Course updated on July 24, 2023

Subscribe

Access this and all courses with a subscription

What's included

Theory: 10 lessons
Exercises: 9
Questions: 24
Self-study tasks
Extra materials
Extended materials for 10 lessons

Description

Testing real applications is much more complicated than just calling functions. There are a lot of network requests to external resources, interaction with the file system, asynchronous code, and external libraries with their tricks. It all comes down to a good understanding of side effects and effective ways to isolate and manage them.

You will learn

  • Freely test even those applications that interact a lot with the external environment
  • Test code that actively works with the file system
  • Apply polymorphism to replace the implementation of code that is inconvenient in testing
  • Use stubs and mocking for their intended purpose

Syllabus

1

Introduction

Explore the course and its objectives

2

Error testing

Learn how to properly test code that throws exceptions

3

Fixtures

Learn how to properly prepare data for tests

4

Side effects

Understand why testing is difficult

5

Testing code that interacts with files

Learn how to properly restore the environment. Explore the virtual file system.

6

Dependency Inversion

Learn to eliminate side effects with polymorphism

7

Testing HTTP Requests

Learn stubbing

8

Monkey patching

Learn how to use prototypes to your advantage

9

Mocking

Explore mocking and learn how to distinguish them from stubs

10

Property-based testing

Explore a property-based approach to testing

Recommended programs

Course Cover
  • Run code right in the browser
  • Lifetime access
  • Learn at your own pace
Subscribe

Access this and all courses with a subscription