Skip to content
masterclass Buddy

Jest · Function

jest.clearAllMocks

Jest CLI options control which tests run and how Jest executes them. They also support coverage, mock cleanup, environment selection, configuration debugging, and troubleshooting open handles.

Last updated

Syntax

jest [options] [testPathPattern ...]

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

Subscribe
  • --watch
  • --watchAll
  • --findRelatedTests
  • --config
  • --coverageDirectory
  • --env
  • --runInBand
  • --showConfig

Source: Jest CLI Options. Checked 2026-11-03.