If you know RSpec, Jasmine is easy! But some common uses of JavaScript may not be as immediately obvious.
Try to use Jasmine (you could use your own setup or just tryjasmine.com) to write some specs that cover cases like these. The links will load up an example.
- jQuery DOM manipulation - change the DOM based on state of the DOM
- jQuery event binding - verify an event was bound
- [More jQuery event binding(http://tryjasmine.com/?gist=1378942) - example from Chris Powers
- conditional stubbing w/ backbone - an object that's isolated from its depended-on backbone model
- $.ajax w/ spies - spec AJAX behavior in a unit test
- a real-world-ish backbone view - a Backbone View that's isolated from its model and its template
- faking dates - a spec that only passes in the 1990s