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.5.0 to 0.5.1

1

lib/intercept.js

@@ -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();

4

lib/recorder.js

@@ -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 @@ });

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