mercredi 24 juin 2015

AngularJS & Karma-Jasmine - $httpbackend flush only if there is one or more pending requests

Is it possible to call $httpbackend.flush(); only if there are some pending request ? So I will never get

Error: Unflushed requests: 1,2,3,...,n

Or

Error: No pending request to flush !

Aucun commentaire:

Enregistrer un commentaire