Hi,

what's the easiest/cleanest way to overwrite already mocked request? 

Currently when a new mock is added via ".when" method, it's added to the 
end of definition list 
(https://github.com/angular/angular.js/blob/g3_v1_4/src/ngMock/angular-mocks.js#L1251)
 
and when checking if there's a match, it starts iterating over definition 
list from the beginning 
(https://github.com/angular/angular.js/blob/g3_v1_4/src/ngMock/angular-mocks.js#L1191).
 
Wouldn't it make more sense to either add new mocks to the beginning of 
this list or iterate it from the end, so that mocks added later would be 
checked first?

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to