diff --git a/package.json b/package.json index bf7f26b..57794a6 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,9 @@ } } }, + "prettier": { + "singleQuoute": true + }, "volta": { "node": "14.2.0", "yarn": "1.22.4" diff --git a/src/index.ts b/src/index.ts index 42ef1b1..669b7f8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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++; @@ -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; @@ -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);