# sapegin/jest-cheat-sheet

Jest cheat sheet

Repository: https://github.com/sapegin/jest-cheat-sheet
Canonical: https://ross.abutalabs.com/products/jest-cheat-sheet
License: CC0-1.0
License Family: permissive
Topics: testing, cheatsheet, jest
Last push: 2024-10-30T07:49:42+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3466, "days_push": 672, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5421, forks 701 (observed 2026-08-28T04:09:17.921385+00:00)

## What it is
A community-maintained cheat sheet for the Jest JavaScript testing framework, covering test structure, matchers, async tests, and mocking patterns with concise code examples. It serves as a quick reference for developers writing unit tests with Jest.

## Use cases
- look up Jest matcher syntax quickly
- learn how to mock modules and functions in Jest
- find examples of async testing with async/await and promises
- reference timer mocks and snapshot testing patterns
- write data-driven tests with test.each
- onboard a team to Jest testing conventions

## When to choose
- you need a quick, copy-pasteable reference for Jest APIs
- you're learning Jest and want concise examples instead of full docs
- you're migrating tests and need to check Jest-specific mocking patterns

## When to avoid
- you use Vitest or another test framework (see the author's Vitest cheat sheet instead)
- you need comprehensive official documentation or API details
- you need a runnable testing tool rather than a reference document

## Facets
- artifact type: learning-resource
- maturity: active
- function: testing, mocking, documentation
- domain: testing, developer-tools, tutorials
- platform: -
- tags: jest, cheatsheet, unit-testing, reference-guide, nodejs, javascript

## Member repositories
- sapegin/jest-cheat-sheet (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:17.921385+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:56:56.325744+00:00, confidence not recorded.
  - readme: https://github.com/sapegin/jest-cheat-sheet (fetched 2026-08-28T04:09:17.921385+00:00, sha 131421532abd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
