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