angular / prophecy

Deferred/Promise for AngularJS 2.0
Other
36 stars 6 forks source link

PromiseBackend#flush (PromiseMock) should warn if missing PromiseBackend.queue #2

Closed caitp closed 10 years ago

caitp commented 10 years ago

one of the failing tests in http#18 is related to this.

Since we're just getting a TypeError, it makes it sort of tricky for the person writing tests to fix this, it would be useful to be a bit more informative.

In angular-mocks, trying to flush with no outstanding requests will cause a test to fail, so we probably do want to fail in this case, but it's probably a better idea to make the error explicitly about "no promises to flush" or something.