Generated by GPT-5-mini| Jasmine (software) | |
|---|---|
| Name | Jasmine |
| Developer | Pivotal Software |
| Released | 2010 |
| Latest release version | 3.x |
| Programming language | JavaScript |
| Operating system | Cross-platform |
| License | MIT License |
Jasmine (software) is a behavior-driven development framework for testing JavaScript code. It provides a clean syntax for writing unit tests and spies and is widely used alongside web frameworks, build tools, and continuous integration systems. Jasmine emphasizes simplicity and readability, enabling developers to write tests for client-side and server-side JavaScript.
Jasmine originated as a testing framework intended for JavaScript environments and quickly became popular in projects using WebKit, Node.js, AngularJS, React (web framework), and Backbone.js. It offers a suite of features including matchers, spies, and asynchronous support that fit into workflows involving Grunt, Gulp (software), Webpack, and Babel. Jasmine's design complements test runners such as Karma (test runner), Protractor, and Jest (software), and integrates with continuous integration platforms like Travis CI, Jenkins, CircleCI, and GitHub Actions.
Jasmine was created in the context of increasing adoption of Ajax and single-page applications in the late 2000s, when teams using Google Chrome, Mozilla Firefox, and Internet Explorer required reliable JavaScript testing. Early development involved contributors associated with Pivotal Labs and adopters from projects at ThoughtWorks and Microsoft. Over successive releases, Jasmine added features inspired by practices in RSpec and JUnit (framework), evolving to support modern syntax with ECMAScript 6 and later ECMAScript 2015 features. Community contributions and maintenance have come from engineers active in repositories hosted on GitHub and discussed in forums like Stack Overflow.
Jasmine's architecture centers on a lightweight assertion and spy library that is framework-agnostic, allowing use in browsers such as Safari, and server environments such as Node.js. Core components include: - Spec definitions organized with describe/it blocks influenced by RSpec and JUnit (framework), enabling nested suites and lifecycle hooks used in integrations with Mocha (test framework)-style tooling. - Matchers for assertions with built-in comparisons and extensibility mirroring patterns from RSpec and Hamcrest. - Spies, stubs, and mock capabilities for function inspection used by projects integrating with Sinon.js and replacement libraries from TestDouble (software). - Asynchronous testing utilities compatible with Promises and async/await patterns introduced in ECMAScript 2017. Jasmine's distribution is commonly packaged via npm, and its licensing under the MIT License encourages reuse in commercial products from vendors such as Google and Microsoft.
Developers typically write specs that run in browsers orchestrated by runners like Karma (test runner) or headless engines like PhantomJS and Headless Chromium via Puppeteer. Example patterns are frequently demonstrated in tutorials from Mozilla Developer Network contributors and in documentation by teams at Google Chrome Labs and Facebook. Jasmine's matcher syntax and lifecycle hooks are showcased in sample apps based on AngularJS, Ember.js, and React (web framework), and in server-side test suites for applications running on Express (web framework) with persistence via MongoDB or PostgreSQL.
The ecosystem around Jasmine includes plugins, reporters, and adapters that connect to tools like Karma (test runner), Protractor, Istanbul (software), and nyc (software). Integration with IDEs and editors such as Visual Studio Code, WebStorm, Sublime Text, and Atom (text editor) is common through extensions and language server support. Third-party libraries provide enhanced assertions, snapshot testing adapters influenced by Jest (software), and CI-friendly reporters tailored for Jenkins and CircleCI. Corporate users in companies like Pivotal, Google, and Microsoft have incorporated Jasmine into enterprise pipelines alongside container platforms such as Docker and orchestrators like Kubernetes.
Jasmine has been influential in shaping JavaScript testing conventions and contributed practices now seen across frameworks and tools used by teams at GitHub, Google, Facebook, and Netflix. It received attention in technical publications and conference talks at events such as jsConf, Node.js Interactive, and Google I/O, and has been compared to frameworks like Mocha (test framework), Jest (software), and Tape (software). Its emphasis on behavior-driven syntax affected the popularity of BDD in JavaScript projects and informed testing education resources produced by organizations such as Mozilla and FreeCodeCamp.
Category:JavaScript libraries Category:Software testing tools