Open labrute opened 6 years ago
I have updated es6-promise to v4.2.4 and the problem is the same :
Error: No pending request to flush ! (line 1852) flush@node_modules/angular-mocks/angular-mocks.js:1852:83 invoke@node_modules/angular/angular.js:5040:24 WorkFn@node_modules/angular-mocks/angular-mocks.js:3183:26 inject@node_modules/angular-mocks/angular-mocks.js:3150:28 eval code eval@[native code] evaluate@node_modules/systemjs/dist/system.src.js:2818:16 node_modules/systemjs/dist/system.src.js:3586:29 dynamicExecute@node_modules/systemjs/dist/system.src.js:1142:30 doEvaluate@node_modules/systemjs/dist/system.src.js:1089:27 ensureEvaluate@node_modules/systemjs/dist/system.src.js:997:23 node_modules/systemjs/dist/system.src.js:610:28 tryCatch@node_modules/es6-promise/dist/es6-promise.auto.js:409:20 invokeCallback@node_modules/es6-promise/dist/es6-promise.auto.js:424:21 publish@node_modules/es6-promise/dist/es6-promise.auto.js:398:21 flush@node_modules/es6-promise/dist/es6-promise.auto.js:128:13
Hi, I m using es6-promise for my karma tests and i have discovered and strange behavior on with jasmine tests. This bug appear when I'm catching the http error in my code.
Example : Code
Test
I'm using angular mock for all my backend tests, and if the parameter is not the expected one I have this error :
Now, if I remove the catch, I have the expected message :
My environnement :
Thx for your help.