Jasmine runs unit and behavior specs in JavaScript without requiring a particular app framework or browser DOM. The same style works for website front ends and Node.js code.
Overview
Jasmine is a testing framework centered on behavior-driven development for JavaScript. Specs are ordinary JavaScript: suites use describe blocks and examples use it blocks with expect matchers, and the framework does not alter how your application loads or executes.
It is intended to run wherever JavaScript runs, including browser environments and Node.js, so teams can share one testing approach across client and server code. The core package has no external dependencies, keeping runtime overhead low.
Installation paths vary by environment, with tutorials for first suites, FAQs, and full reference material. Jasmine tests itself on several current Node releases and major evergreen browsers including Safari, Chrome, Firefox, and Edge.
Older or less common browser versions may still work but are not actively guaranteed. Environment support details are published with each release.
Key features
- describe and it spec syntax
- No required JS framework
- Browser and Node execution
- Low-dependency core
- Plain JavaScript specs
- Documentation and tutorials
- Matchers via expect API
Use cases
- Unit testing JavaScript modules
- Behavior specs in web apps
- Node.js backend test suites
- Shared tests across browser and Node
- Test-driven workflows