LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

jest

JavaScript testing framework with focus on simplicity

TLDR

Run all tests
$ jest
copy
Run specific test file
$ jest [path/to/test.js]
copy
Run tests matching pattern
$ jest -t "[pattern]"
copy
Run in watch mode
$ jest --watch
copy
Generate coverage report
$ jest --coverage
copy
Update snapshots
$ jest -u
copy
Run tests in parallel
$ jest --maxWorkers=[4]
copy
Run only changed tests
$ jest --onlyChanged
copy

SYNOPSIS

jest [options] [files...]

DESCRIPTION

jest is a JavaScript testing framework with focus on simplicity. It provides test runners, assertions, mocking, and code coverage in a single package.The tool features snapshot testing, parallel execution, and intelligent test selection. It works with React, Vue, Node.js, and most JavaScript projects.

PARAMETERS

--watch

Watch mode for changed files.
--watchAll
Watch all files.
--coverage
Collect code coverage.
-t pattern
Run matching test names.
-u, --updateSnapshot
Update snapshots.
--maxWorkers n
Max parallel workers.
--onlyChanged
Run only changed tests.
--bail
Stop on first failure.
--verbose
Display individual test results.
--config file
Configuration file.
--ci
CI mode settings.

CAVEATS

Default test regex may miss files. Snapshots need review. Coverage may miss edge cases. Memory usage high with many tests.

HISTORY

Jest was created by Facebook (Meta), initially for testing React applications. Released around 2014, it evolved from Jasmine roots to become one of the most popular JavaScript testing frameworks, known for its zero-configuration approach.

SEE ALSO

npm(1), mocha(1), vitest(1), playwright(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid