some tricky test moments in Jasmine
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