Comparing version 0.5.0 to 0.5.1
@@ -135,3 +135,2 @@ var path = require('path') | ||
console.log('interceptors length:', interceptors.length); | ||
if (interceptors.length < 1) { throw new Error("Nock: No match for HTTP request " + stringifyRequest(options)); } | ||
@@ -138,0 +137,0 @@ interceptor = interceptors.shift(); |
@@ -30,5 +30,5 @@ var http = require('http'); | ||
} | ||
ret.push(')\n'); | ||
ret.push("')\n"); | ||
ret.push(' .(') | ||
ret.push(' reply.(') | ||
ret.push(res.statusCode.toString()); | ||
@@ -35,0 +35,0 @@ ret.push(', '); |
@@ -27,3 +27,3 @@ var path = require('path') | ||
arr.splice(arr.indexOf(interceptor), 1); | ||
if (arr.length === 0) { console.log('deleting interceptor for ', key); delete interceptors[key]; } | ||
if (arr.length === 0) { delete interceptors[key]; } | ||
} | ||
@@ -30,0 +30,0 @@ } |
{ "name" : "nock" | ||
, "description" : "HTTP Server mocking for Node.js" | ||
, "tags" : ["Mock", "HTTP", "testing", "isolation"] | ||
, "version" : "0.5.0" | ||
, "version" : "0.5.1" | ||
, "author" : "Pedro Teixeira <pedro.teixeira@gmail.com>" | ||
@@ -10,2 +10,3 @@ , "contributors" : | ||
, {"name":"Pedro Teixeira"} | ||
, {"name":"Nuno Job"} | ||
] | ||
@@ -12,0 +13,0 @@ , "repository" : |
@@ -22,3 +22,3 @@ var nock = require('../.') | ||
t.equal(ret.length, 1); | ||
t.equal(ret[0].indexOf("\nnock('expensecat.iriscouch.com')\n .post('/, \"ABCDEF\")\n .("), 0); | ||
t.equal(ret[0].indexOf("\nnock('expensecat.iriscouch.com')\n .post('/, \"ABCDEF\"')\n reply.("), 0); | ||
t.end(); | ||
@@ -25,0 +25,0 @@ }); |
38991
1099