Jest
Delightful JavaScript testing framework. Run unit and integration tests with snapshots, mocking, and code coverage.
44 commands
Browse by Topic
Install Jest
Install Jest testing framework as a dev dependency
Install Jest with TypeScript
Install Jest with TypeScript support via ts-jest
Run all tests
Execute all test files matching the default pattern
Initialize Jest config
Generate a jest.config.js file with interactive prompts
Run all tests
Run all test files.
Watch mode
Watch files for changes and rerun tests.
Watch all tests
Watch mode that reruns all tests.
Run specific file
Run tests from a specific file.
Run by pattern
Run tests matching name pattern.
Generate coverage
Run tests with coverage report.
Verbose output
Display detailed test results.
Changed files only
Run tests for changed files only.
Only changed tests
Run tests related to changed files.
Serial execution
Run tests serially in current process.
Custom config
Run with custom config file.
Config file option
Specify configuration file path.
Silent mode
Suppress all console output.
Node environment
Use Node environment instead of jsdom.
Set max workers
Limit number of worker processes.
Serial execution shorthand
Run tests serially (shorthand).
Detect open handles
Find async operations that prevent exit.
Force exit
Force Jest to exit after tests complete.
Update snapshots
Update all failing snapshots.
Update snapshots full
Update all failing snapshots (full flag).
Clear cache
Delete Jest cache directory.
Disable cache
Run tests without cache.
CI mode
Run in continuous integration mode.
Bail on failure
Exit immediately on first test failure.
Coverage from pattern
Collect coverage from specific files.
Coverage directory
Set coverage output directory.
Coverage reporters
Specify coverage report formats.
Tests since branch
Run tests changed since git branch.
List all tests
List all test files Jest will run.
Show configuration
Display resolved Jest configuration.
Debug mode
Print debug information.
Node inspector
Run tests with Node inspector.
Break on start
Pause before test execution.
Debug with Node
Debug Jest with Node debugger.
Skip coverage
Run tests without coverage collection.
Set timeout
Set test timeout in milliseconds.
Max concurrency
Limit concurrent tests in describe.
Log heap usage
Log heap usage after each test.
Expand diff output
Show full diff output for failures.
Show version
Display Jest version number.
Discussion
Loading comments...