Unable to test a rejected promise after migrating to Angular 1.6.3
问题 I have recently updated my application from Angular 1.5 to 1.6.3 and started getting Jasmine unit test failures (with PhantomJS) around promise based code I have written: Possibly unhandled rejection: undefined thrown Reading around I see that the accepted solution is to chain .then() with .catch() blocks to handle the rejections gracefully. I have done this for one of my source files that I am testing to prove this gets past the error which it does. However, it has now uncovered a further