Socket
Socket
Sign inDemoInstall

jest-cli

Package Overview
Dependencies
303
Maintainers
6
Versions
388
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    jest-cli

Delightful JavaScript Testing.


Version published
Weekly downloads
23M
decreased by-0.83%
Maintainers
6
Install size
15.4 MB
Created
Weekly downloads
 

Package description

What is jest-cli?

The jest-cli npm package is the command line interface for Jest, a popular JavaScript testing framework. It allows developers to run tests, configure Jest options, and interact with Jest directly from the command line. Jest is widely used for testing React applications, but it can also be used for testing other JavaScript code.

What are jest-cli's main functionalities?

Running Tests

Run all tests in a project. This is the most basic and commonly used command to start the Jest test runner.

jest

Running Tests in Watch Mode

Run Jest in watch mode. This command will re-run tests when files change, which is useful during development.

jest --watch

Running Specific Tests

Run tests in a specific file or files matching a pattern. This allows for more targeted testing.

jest testFileName

Configuring Jest

Specify a configuration file for Jest. This allows developers to customize how Jest behaves, including setting up test environments, mock implementations, and more.

jest --config=jest.config.js

Coverage Reporting

Generate a test coverage report. This helps developers understand which parts of their codebase are covered by tests.

jest --coverage

Other packages similar to jest-cli

Changelog

Source

28.1.0

Features

  • [jest-circus] Add failing test modifier that inverts the behavior of tests (#12610)
  • [jest-environment-node, jest-environment-jsdom] Allow specifying customExportConditions (#12774)

Fixes

  • [expect] Adjust typings of lastCalledWith, nthCalledWith, toBeCalledWith matchers to allow a case there a mock was called with no arguments (#12807)
  • [@jest/expect-utils] Fix deep equality of ImmutableJS Lists (#12763)
  • [jest-core] Do not collect SIGNREQUEST as open handles (#12789)

Chore & Maintenance

  • [docs] Specified documentation about --filter CLI docs (#12799)
  • [@jest-reporters] Move helper functions from utils.ts into separate files (#12782)
  • [jest-resolve] Replace process.versions.pnp type declaration with @types/pnpapi devDependency (#12783)

Readme

Source

Jest

🃏 Delightful JavaScript Testing

  • 👩🏻‍💻 Developer Ready: Complete and ready to set-up JavaScript testing solution. Works out of the box for any React project.

  • 🏃🏽 Instant Feedback: Failed tests run first. Fast interactive mode can switch between running all tests or only test files related to changed files.

  • 📸 Snapshot Testing: Jest can capture snapshots of React trees or other serializable values to simplify UI testing.

Read More: https://jestjs.io/

Keywords

FAQs

Last updated on 06 May 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc