JavaScript Behavior Driven Development (BDD) With JSpec

Test JavaScript functionality extremely quickly using the intuitive, minimalistic, JSpec framework. This framework aims to provide nearly no installation hassle, an extremely low learning curve, and high reliability for testing JavaScript behaviors.

Why A New BDD Framework For JavaScript?

JavaScript certainly has a handful of test frameworks, however nearly all of them seemed out-dated in terms of syntax, usability, readability, and certainly installation was a hassle with most. As mentioned above JSpec does not aim to create the most robust framework of them all, however it aims to be the most logical and readable of them all.

What Does It Look Like?

with (suite('array method .remove')) {
 
  before_each (function(){
    this.array = ['a', 'b', 'c'];
  });
 
  it ('Should remove single elements', function(){
    this.array.remove(0).length.should_equal(2);
  });
 
  it ('Should remove multiple elements', function(){
    this.array.remove(0, 1).length.should_equal(1);
  });
 
}

What Do The Test Results Look Like?

test results

Where Can I Get It?

JSpec can be easily downloaded from Github at the following uri (click download):
http://github.com/visionmedia/jspec/tree/master or visit http://jspec.info

Library Dependencies?

JSpec is not dependent on any JavaScript library (jQuery, Mootools, etc) and may be used to test any of these.

JSpec TextMate Bundle

http://github.com/visionmedia/jspec.tmbundle