A JavaScript Testing Framework
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.
Documentation & guides live here: http://pivotal.github.com/jasmine/
-
Individual specs or suites can be marked as the only test(s) to run by calling
odescribe()
oroit()
instead ofdescribe()
orit()
. -
If there are multiple oits, then they will each run and all other non-oit specs will be skipped.
-
When using odescribe, all specs within that suite will be tested, including those in any nested suites. However, if there is an oit within an odescribe, then the oit gets priority and no other specs within the suite will run (except for other oits).
-
Moreover, if the oit is nested in another suite within the odescribe, then that oit is the only spec that will run within that inner suite. The rest of the specs outside of that suite, but still within the scope of the original odescribe, also run.
// Example 1. Only the second test will run. describe("Jasmine", function() { it("makes testing JavaScript awesome!", function() { expect(yourCode).toBeLotsBetter(); }); oit("now has added oit functionality!", function() { expect(yourCode).toBeEvenBetter(); }); }); // Example 2. Only the first suite will run. odescribe("Suite 1", function() { it("test 1", function() { expect(thisWillRun).toBeTruthy(); }); it("test 2", function() { expect(thisWillRun).toBeTruthy(); }); }); describe("Suite 2", function() { it("test 3", function() { expect(thisWillRun).toBeFalsey(); }); });
- Search past discussions: http://groups.google.com/group/jasmine-js
- Send an email to the list: [email protected]
- Check the current build status: ci.pivotallabs.com
- View the project backlog at Pivotal Tracker: http://www.pivotaltracker.com/projects/10606
- Follow us on Twitter: @JasmineBDD
- Davis W. Frank, Pivotal Labs
- Rajan Agaskar, Pivotal Labs
- Christian Williams, Square
Copyright (c) 2008-2011 Pivotal Labs. This software is licensed under the MIT License.