Though some of the concepts in this course are still relevant, overall this course does not reflect our current course standards or industry best practices.

Check out a free preview of the full Backbone.js (with Introduction to Testing) course:
The "Testing Event Handlers" Lesson is part of the full, Backbone.js (with Introduction to Testing) course featured in this preview video. Here's what you'd learn in this lesson:

Testing event handlers can be tricky because they are reliant on the DOM. The best way to test them in isolation would be to either trigger the event or pass the event a mock-object. While debugging some of the testing scripts, Sam discusses a few troubleshooting resources for writing unit test including the Sinon.js documentation. He also discusses some drawbacks to consider when writing tests.

Get Unlimited Access Now