Comparing version 0.1.4 to 0.1.5
@@ -97,4 +97,4 @@ var path = require('path') | ||
function get(uri) { | ||
return intercept(uri, 'GET'); | ||
function get(uri, requestBody) { | ||
return intercept(uri, 'GET', requestBody); | ||
} | ||
@@ -105,2 +105,10 @@ | ||
} | ||
function put(uri, requestBody) { | ||
return intercept(uri, 'PUT', requestBody); | ||
} | ||
function _delete(uri, requestBody) { | ||
return intercept(uri, 'DELETE', requestBody); | ||
} | ||
@@ -158,2 +166,4 @@ function pendingMocks() { | ||
, post: post | ||
, delete: _delete | ||
, put: put | ||
, done: done | ||
@@ -160,0 +170,0 @@ , filteringPath: filteringPath |
{ "name" : "nock" | ||
, "description" : "HTTP Server mocking for Node.js" | ||
, "tags" : ["Mock", "HTTP", "testing", "isolation"] | ||
, "version" : "0.1.4" | ||
, "version" : "0.1.5" | ||
, "author" : "Pedro Teixeira <pedro.teixeira@gmail.com>" | ||
@@ -6,0 +6,0 @@ , "repository" : |
# Nock | ||
HTTP Server mocking for Node.js | ||
Nock is an HTTP mocking and expectations library for Node.js | ||
@@ -55,2 +55,6 @@ Nock can be used to test modules that perform HTTP requests in isolation. | ||
## HTTP Verbs | ||
Nock supports get, post, put and delete HTTP verbs. | ||
## Chaining | ||
@@ -57,0 +61,0 @@ |
21908
595
136