Socket
Socket
Sign inDemoInstall

nock

Package Overview
Dependencies
Maintainers
1
Versions
430
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nock - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

14

lib/scope.js

@@ -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

2

package.json
{ "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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc