The `jasmine` package provides a command-line interface (CLI) and supporting utilities for running Jasmine Behavior Driven Development (BDD) tests in Node.js environments. As of its current stable version 6.2.0, this package acts as a runner for `jasmine-core`, which is the actual testing framework. Jasmine is known for its clean and easy-to-understand syntax, requiring no DOM or external JavaScript frameworks, making it suitable for a wide range of JavaScript projects. The project maintains an active release cadence, with minor and patch updates frequently, and major versions introducing significant changes every few months. It is compatible with both ES modules and CommonJS modules and officially supports Node.js versions 20, 22, and 24, with best-effort support for environments past their end-of-life.
npm install jasmineVerified import paths — ran on the pinned version, not inferred.
Demonstrates setting up Jasmine, writing a basic spec, and running tests via the CLI.
Upgrade your Node.js environment to version 20, 22, or 24.
If using `ConsoleReporter` programmatically, install `@jasminejs/reporters` and update your imports accordingly. For example, `import { ConsoleReporter } from '@jasminejs/reporters';`Consolidate your Jasmine configuration into a single `jasmine.json` file or use programmatic configuration via the `Jasmine` class to manage multiple configurations explicitly.
Refactor code to use documented public APIs. Avoid relying on internal Jasmine structures that were not explicitly exposed for public consumption.
For Karma users outside Angular, consider migrating to alternatives like `jasmine-browser-runner` or `web-test-runner`. Angular users should consult Angular documentation for future Jasmine support.
Ensure your project uses a currently supported Node.js Long Term Support (LTS) release for reliable operation and continued compatibility.
Run your tests using `npx jasmine` (or `npm test` if configured) instead of `node your-spec-file.js`. Ensure Jasmine is correctly installed and initialized (`npx jasmine init`).
Install the Jasmine type definitions: `npm install --save-dev @types/jasmine`. Ensure your `tsconfig.json` includes `jasmine` in the `types` array or that `typeRoots` is correctly configured to find `@types` packages.