Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
}
}
},
"prettier": {
"singleQuoute": true
},
"volta": {
"node": "14.2.0",
"yarn": "1.22.4"
Expand Down
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