mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-03-29 00:09:01 +08:00
Change angular-mocks to throw errors on unexpected gets in the format JSTD now expects
This commit is contained in:
committed by
Misko Hevery
parent
a930e782a5
commit
c30807d141
5
test/angular-mocks.js
vendored
5
test/angular-mocks.js
vendored
@@ -75,7 +75,10 @@ function MockBrowser() {
|
||||
var expect = expectations[method] || {};
|
||||
var response = expect[url];
|
||||
if (!response) {
|
||||
throw "Unexepected request for method '" + method + "' and url '" + url + "'.";
|
||||
throw {
|
||||
message: "Unexpected request for method '" + method + "' and url '" + url + "'.",
|
||||
name: "Unexpected Request"
|
||||
};
|
||||
}
|
||||
requests.push(function(){
|
||||
callback(response.code, response.response);
|
||||
|
||||
Reference in New Issue
Block a user