Why should I bother testing JS?It must be treated like any other languageIts usage is evolving and is at the forefront of HTML 5amongst other technologies like Googles V8 and node.js3 Ss Sound Sustainable Speed
Brief OverviewJasmine is an open source project by the folks at PivotalLabsFramework agnosticWorks standalone with any type of projectBehavior Driven Approach inspired by RSpec
BDDWrite tests that match the feature desired by thebusiness. The code is then a reflection of exactly whatthe business wants.Business perspective: "When a user lands on the homepage and selects this option then they should see this"Developers perspective: "When the page renders, thenthis method is called with these arguments"
Getting StartedDownloads section: http://pivotal.github.com/jasmine/Walk through set up standalone mode Ruby gem Maven plugin Compatible with node.js
MatchersThese are what makes Jasmine so powerful and easy touseThe framework is extensible to write your own, but theones that come out of the box are actually awesome
SpiesA spy is simply a way to write an expectation andassertion that a method is called called with certain arguments returns a "stubbed" value
jquery-jasmineSimple 1 file "plugin"Comes with a bunch of addnl matchersAbility to load DOM "fixtures"