visionmedia/mocha — Issue #274: waitsFor work-a-like for jasmine converts who have been missing it
Author: michaelsbradleyjr
Created: 2012-02-22 05:45:21+00:00
State: open

I recently switched to mocha, and the one thing I missed was the `waitsFor` facility [provided by Jasmine](https://github.com/pivotal/jasmine/wiki/Asynchronous-specs).

Much of the time, I find I'm better off using EventEmitter to achieve similar results. But there are times when it's just more straightforward to periodically check that a side-effect I'm expecting to occur has occurred. My standalone [waitsFor](https://github.com/michaelsbradleyjr/waitsFor) utility scratches that itch, and I thought some other mocha users might also find it helpful:

[https://github.com/michaelsbradleyjr/waitsFor](https://github.com/michaelsbradleyjr/waitsFor)

I'm not sure it merits a mention on mocha's `gh-pages` [site](http://visionmedia.github.com/mocha/), but if it does that's fine too. :-)