Skip to content

Commit c30807d

Browse files
Shyam Seshadrimhevery
authored andcommitted
Change angular-mocks to throw errors on unexpected gets in the format JSTD now expects
1 parent a930e78 commit c30807d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/angular-mocks.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ function MockBrowser() {
7575
var expect = expectations[method] || {};
7676
var response = expect[url];
7777
if (!response) {
78-
throw "Unexepected request for method '" + method + "' and url '" + url + "'.";
78+
throw {
79+
message: "Unexpected request for method '" + method + "' and url '" + url + "'.",
80+
name: "Unexpected Request"
81+
};
7982
}
8083
requests.push(function(){
8184
callback(response.code, response.response);

0 commit comments

Comments
 (0)