mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-22 05:11:51 +00:00
Change angular-mocks to throw errors on unexpected gets in the format JSTD now expects
This commit is contained in:
parent
a930e782a5
commit
c30807d141
1 changed files with 4 additions and 1 deletions
5
test/angular-mocks.js
vendored
5
test/angular-mocks.js
vendored
|
|
@ -75,7 +75,10 @@ function MockBrowser() {
|
||||||
var expect = expectations[method] || {};
|
var expect = expectations[method] || {};
|
||||||
var response = expect[url];
|
var response = expect[url];
|
||||||
if (!response) {
|
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(){
|
requests.push(function(){
|
||||||
callback(response.code, response.response);
|
callback(response.code, response.response);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue