jest-cli
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
@jest/core | 29.7.0 | 30.03 kB | MIT | prod | 1 1 |
@jest/test-result | 29.7.0 | 4.21 kB | MIT | prod | |
@jest/types | 29.6.3 | 8 kB | MIT | prod | |
chalk | 4.1.2 | 11.31 kB | MIT | prod | |
create-jest | 29.7.0 | 5 kB | MIT | prod | 1 1 |
exit | 0.1.2 | 14.94 kB | MIT | prod | |
import-local | 3.1.0 | 2.34 kB | MIT | prod | |
jest-config | 29.7.0 | 25.91 kB | MIT | prod | 1 1 |
jest-util | 29.7.0 | 10.86 kB | MIT | prod | |
jest-validate | 29.7.0 | 7.56 kB | MIT | prod | |
yargs | 17.7.2 | 64.15 kB | MIT | prod |
Jest-cli is a comprehensive, ready-to-use JavaScript testing tool that offers delightful user experience for developers. It includes everything you need for testing your JavaScript code, right out of the box. Whether you're working with React or another JavaScript project, jest-cli has you covered. One of its main features is instant feedback: it runs failed tests first, and its fast interactive mode lets you choose between running all tests or only those related to changed files. It also supports snapshot testing, allowing you to capture snapshots of React trees or other serializable values for easier UI testing.
Using jest-cli is simple and straightforward. It can be installed and utilized directly from the Node.js environment. Here's a basic example on how to install and use jest-cli:
// Install jest-cli globally
npm install -g jest-cli
// Run all the tests
jest
In this setup, jest
command will run all test files in your project. Jest will locate test files with .test.js
or .spec.js
in their names. For more granular control, you can use the following command:
// Run specific test file
jest path_to_your_test_file.js
In this command, replace the path_to_your_test_file.js
with the actual path to your Jest test file.
Comprehensive documentation for jest-cli is available at Jest's official website. Here, you can learn more about the features of jest-cli, get in-depth instructions on how to set up and use jest-cli in your JavaScript projects, and explore advanced topics such as snapshot testing, mock functions, and more. The documentation is designed to be accessible for developers of all experience levels.