Simple JavaScript testing framework for browsers and node.js
Jasmine-core is a vital npm package designed specifically for developers looking to implement behavior-driven development (BDD) within their JavaScript applications. As a standalone core framework, Jasmine-core facilitates both browser-based and Node.js environments, making it a versatile choice for testing. The framework does not rely on any other JavaScript frameworks, nor does it require a DOM, and its clean, obvious syntax ensures that tests are readable and maintainable. Key benefits of using Jasmine-core include its ability to write tests on a clean slate, support for asynchronous testing, and a rich set of features such as spies, stubs, and mocks which help in creating robust test suites.
To integrate Jasmine-core into your project, the process is straightforward with the use of npm, the Node package manager. By running the command `npm install jasmine-core`, developers can easily add Jasmine's capabilities to their development environment. This installation provides the necessary modules to begin writing comprehensive test suites that can validate the functionality and reliability of applications across different platforms. Utilizing Jasmine-core through npm ensures that developers have a consistent, updated version of the framework, allowing them to leverage the latest features and improvements in their testing strategies.
Jasmine-core is specifically engineered to enhance testing efficiency and accuracy in JavaScript projects. It provides an elegant solution to the challenges of testing asynchronous operations, a common requirement in modern web applications. The framework's structure encourages clear and well-structured test specifications, which in turn improves the quality of the software development process. By adopting Jasmine-core, teams can foster better collaboration and understanding among developers, ensuring that all functional requirements are thoroughly vetted before deployment.
Core dependencies of this npm package and its dev dependencies.
eslint, eslint-plugin-compat, glob, grunt, grunt-cli, grunt-contrib-compress, grunt-contrib-concat, grunt-css-url-embed, grunt-sass, jasmine, jasmine-browser-runner, jsdom, load-grunt-tasks, prettier, sass, shelljs, temp
A README file for the jasmine-core code repository. View Code
Jasmine is a Behavior Driven Development testing framework for JavaScript. It does not rely on browsers, DOM, or any JavaScript framework. Thus it's suited for websites, Node.js projects, or anywhere that JavaScript can run.
Upgrading from Jasmine 4.x? Check out the upgrade guide.
Please read the contributors' guide.
There are several different ways to install Jasmine, depending on your environment and how you'd like to use it. See the Getting Started page for details.
See the documentation site, particularly the Your First Suite tutorial for information on writing specs, and the FAQ.
Jasmine tests itself across popular browsers (Safari, Chrome, Firefox, and Microsoft Edge) as well as Node.
Environment | Supported versions |
---|---|
Node | 18, 20 |
Safari | 15-17 |
Chrome | Evergreen |
Firefox | Evergreen, 102, 115 |
Edge | Evergreen |
For evergreen browsers, each version of Jasmine is tested against the version of the browser that is available to us at the time of release. Other browsers, as well as older & newer versions of some supported browsers, are likely to work. However, Jasmine isn't tested against them and they aren't actively supported.
To find out what environments work with a particular Jasmine release, see the release notes.
Copyright (c) 2008-2019 Pivotal Labs
Copyright (c) 2008-2023 The Jasmine developers
This software is licensed under the MIT License.