Skip to content

kristiancalhoun/jasmineAGI

 
 

Repository files navigation

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/

What's New In This Fork?

  • Individual specs or suites can be marked as the only test(s) to run by calling odescribe() or oit() instead of describe() or it().

  • 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();
      	
      	});
      
      });
    

Support

Maintainers

Copyright (c) 2008-2011 Pivotal Labs. This software is licensed under the MIT License.

About

DOM-less simple JavaScript testing framework

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 97.8%
  • Ruby 2.2%