Skip to content
masterclass Buddy

Jest · Module

not

Install Jest, write a test, and run it with a package script or the command line. Jest uses expect and matchers such as toBe to check results.

Last updated

Syntax

npm install --save-dev jest
"test": "jest"
test(name, fn)
expect(value).toBe(expected)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Using Matchers
  • Jest CLI Options
  • babel-jest
  • ts-jest
  • @jest/globals
  • @types/jest
  • eslint-plugin-jest

Source: Getting Started · Jest. Checked 2026-11-03.