Retries a Mocha test until it works
npm install mocha-eventuallyRetries a test until it eventually works.

``js`
eventually(callback(next()), [timeout], [interval]) -> Promise
callback is a function. If it's async, it should either consume the next() parameter, or return a promise.
If it doesn't work within timeout milliseconds, it's considered a failure.
If a test fails and timeout has not ellapsed yet, it will wait interval milliseconds and try again.
Returns a promise, which Mocha will happily consume.
`js
var eventually = require('mocha-eventually')
it('eventually works', function () {
return eventually(function (next) {
assert(Math.random() > 0.9)
}, 2000)
})
``
mocha-eventually © 2015+, Rico Sta. Cruz. Released under the [MIT] License.
Authored and maintained by Rico Sta. Cruz with help from contributors ([list][contributors]).
> ricostacruz.com ·
> GitHub @rstacruz ·
> Twitter @rstacruz
[MIT]: http://mit-license.org/
[contributors]: http://github.com/rstacruz/mocha-eventually/contributors