UNPKG

waitsfor

Version:

Wait for truth of a condition using promises

13 lines (11 loc) 277 B
// these run in phantom describe('waitsFor', () => { it('supports chaining with Q.defer', (done) => { let returnValue = false; expect(Q().waitsFor).toBeDefined(); Q().waitsFor(() => returnValue).done(() => { done() }); returnValue = true; }) });