Skip to main content
Intermediate 9 planned topics Testing

Introduction to Jest

Learn Jest matchers, mocks, and testing JavaScript. Free Jest introduction.

Learning Outcomes

  • Write an it() test with expect
  • Mock a function or module
  • Test async code with async/await
  • Organize suites with describe

Overview

Jest is the default test runner in many JavaScript and React projects.

This page introduces describe/it, matchers, and mocking modules.

You can test pure functions before you test UI.

What this course will cover

  1. 1. Setup
  2. 2. Matchers
  3. 3. Mocks
  4. 4. Async tests
  5. 5. React Testing Library intro
  6. 6. Coverage

Start a complete tutorial now

Full 6-level lessons are live for C, C++, Java, Python, and JavaScript. Use them while the remaining Jest lessons are added.

← All technology tutorials