WebFilings/wf-common — pull request #23 by patkujawa-wf (2014-09-19 04:21:13+00:00)
Title: Use jasmine.async lib to simplify async tests.

Problem: Jasmine 2 changed the way async tests are written in favor of a `done` callback (as mocha does), deprecating the previous `runs/waitsFor` paradigm. Until all tests are migrated to this new paradigm, we can't use jasmine 2.

Solution: Use [derickbailey/jasmine.async](https://github.com/derickbailey/jasmine.async)'s AsyncSpec to get the `done` callback style while still running jasmine 1.x. When all specs are migrated this way, upgrading to jasmine 2 should be as simple as `s/async\.(it|beforeEach|afterEach)/\1/` (and then removing the unused AsyncSpec stuff). (Ok, not quite that easy - other changes are with stubbing, e.g. `spyOn(window, 'setInterval).andCallThrough() -> spyOn(window, 'setInterval').and.callThrough()`, using a fake clock, and custom matchers - see [Jochen Preusche : How to switch from jasmine 1.3.x to jasmine 2.0.0](https://coderwall.com/p/a_sd-a).)