Skip to content

Commit

Permalink
made pretender.handlerFor public
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Sep 1, 2020
1 parent 7003811 commit 47364fc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Pretender.prototype = {
let verb = request.method.toUpperCase();
let path = request.url;

let handler = this._handlerFor(verb, path, request);
let handler = this.handlerFor(verb, path, request);

if (handler) {
handler.handler.numberOfCalls++;
Expand Down Expand Up @@ -210,7 +210,7 @@ Pretender.prototype = {
}
},
requiresManualResolution: function(verb, path) {
let handler = this._handlerFor(verb.toUpperCase(), path, {});
let handler = this.handlerFor(verb.toUpperCase(), path, {});
if (!handler) { return false; }

let async = handler.handler.async;
Expand All @@ -229,7 +229,7 @@ Pretender.prototype = {
path + ' but encountered an error: ' + error.message;
throw error;
},
_handlerFor: function(verb, url, request) {
handlerFor: function(verb, url, request) {
let registry = this.hosts.forURL(url)[verb];
let matches = registry.recognize(parseURL(url).fullpath);

Expand Down

0 comments on commit 47364fc

Please sign in to comment.