Comparing version 0.1.2 to 0.1.3
@@ -14,2 +14,12 @@ var path = require('path') | ||
function stringifyRequest(options) { | ||
var method = options.method || 'GET'; | ||
var path = options.path; | ||
var body = options.body; | ||
if (typeof(body) !== 'string') { | ||
body = body.toString(); | ||
} | ||
return method + ' ' + path + ' ' + body; | ||
} | ||
function processRequest(interceptors, options, callback) { | ||
@@ -49,3 +59,3 @@ var req = new EventEmitter() | ||
if (interceptors.length < 1) { throw new Error("Nock: No match for HTTP request " + JSON.stringify(options)); } | ||
if (interceptors.length < 1) { throw new Error("Nock: No match for HTTP request " + stringifyRequest(options)); } | ||
interceptor = interceptors.splice(0, 1)[0]; | ||
@@ -52,0 +62,0 @@ |
{ "name" : "nock" | ||
, "description" : "HTTP Server mocking for Node.js" | ||
, "tags" : ["Mock", "HTTP", "testing", "isolation"] | ||
, "version" : "0.1.2" | ||
, "version" : "0.1.3" | ||
, "author" : "Pedro Teixeira <pedro.teixeira@gmail.com>" | ||
@@ -6,0 +6,0 @@ , "repository" : |
21559
587