edx/edx-tim — pull request #66 by wedaly (2014-03-02 16:56:53+00:00)
Title: WIP: JavaScript Refactor

An attempt to make our JavaScript more testable.

1) Encapsulate XBlock server interactions in `OpenAssessment.Server`. Uses [JQuery's deferred object](http://api.jquery.com/category/deferred-object/) pattern to allow easy stubbing of the server.
2) Encapsulate DOM interactions in `OpenAssessment.BaseUI` and `OpenAssessment.StudioUI`
3) Add JS tests for `OpenAssessment.Server` and `OpenAssessment.StudioUI`
4) `./manage.py` runs both Python and JavaScript tests; it also reports JS coverage to the console.

I haven't tested the student-facing changes extensively in workbench or the LMS, but I'm interested in comments on the general approach.