---
title: "Jest: JavaScript testing framework with zero configuration"
description: "Jest (August 2014, Facebook, stabilised after 2016): JavaScript/TypeScript testing framework with zero config, snapshot testing, built-in mocking, watch mode. React standard and basis of Vitest."
url: "https://www.noze.it/en/insights/jest-testing/"
lang: "en"
alternate: "https://www.noze.it/insights/jest-testing/"
published: "2016-09-20"
author: "noze S.r.l."
keywords: "Open Source, Web, Jest, Facebook, Meta, Testing, JavaScript, React"
---

# Jest: JavaScript testing framework with zero configuration

Jest (August 2014, Facebook, stabilised after 2016): JavaScript/TypeScript testing framework with zero config, snapshot testing, built-in mocking, watch mode. React standard and basis of Vitest.

20 September 2016

## A framework for React

**Facebook** develops Jest internally to test its own JavaScript codebases — React included. Before Jest, Node testing is fragmented: **Mocha + Chai + Sinon**, **Jasmine**, **AVA**, **Tape** each with different syntax and assembly. Configuring and running takes a lot of setup.

## The release

**Jest** is open-sourced by **Facebook** in **2014**; versions **14.0** (May 2016) and **16.0** (September 2016) mark the transformation into a mass framework with adoption by **Create React App**. Main author: **Christoph Nakazawa**. **MIT** licence.

```
test('sum adds numbers', () => {
  expect(sum(1, 2)).toBe(3);
});

test('user snapshot', () => {
  expect(renderUser()).toMatchSnapshot();
});
```

## Features

- **Zero config** — works out-of-box with ES modules, JSX, TypeScript (via babel-jest)
- **Integrated assertion library** — `expect()` with `.toBe()`, `.toEqual()`, `.toMatch()`, `.toThrow()` matchers
- **Built-in mocking** — `jest.fn()`, `jest.mock()` for modules
- **Snapshot testing** — serialises output and compares on subsequent runs
- **Parallel execution** — worker pool for parallel tests
- **Code coverage** — integrated Istanbul with `--coverage`
- **Watch mode** — interactive, re-runs only affected tests
- **jsdom** environment integrated for DOM tests

## Testing React

Around Jest the React testing ecosystem is growing: **Enzyme** (Airbnb) for component-level testing remains the prevailing choice, with alternatives emerging over time.

## Competitors

- **Mocha + Chai** — historical, more configurable and less opinionated
- **AVA** — concurrent, minimal
- **Jasmine** — older

## In the Italian context

Jest is becoming the standard choice of Italian React teams: headless e-commerce, fintech and first digital-PA projects are adopting it as default.

Update — 2024

In **2018 Kent C. Dodds** releases **@testing-library/react**, which progressively replaces **Enzyme**: the combination **Jest + React Testing Library** becomes the standard for React testing from 2019. Jest is donated to the **OpenJS Foundation** in 2022. From 2021 **Vitest** emerges (born with Vite, Jest-compatible API, ESM-first, very fast) and replaces Jest in many new Vite-based projects; the built-in **Node Test Runner** (Node 20+) and **Bun test** (ultra-fast) further broaden the landscape.

---

_References: Jest (Facebook, Open Source 2014). Christoph Nakazawa lead. MIT licence._
