Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mocksy

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocksy - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

8

index.js

@@ -29,2 +29,6 @@ var http = require('http');

if (this.started) {
return callback();
}
this.server.listen(this.port, function (err) {

@@ -43,2 +47,6 @@ if (!err) {

if (this.stopped) {
return callback();
}
this.server.close(function (err) {

@@ -45,0 +53,0 @@ if (!err) {

2

package.json
{
"name": "mocksy",
"version": "0.1.3",
"version": "0.1.4",
"description": "Mock http server for testing. Regurgitates the request object.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -26,9 +26,15 @@ var test = require('tape');

mocksy.start(function () { // test for server already started
mocksy.stop(function (err) {
t.equal(mocksy.started, false, 'server is not started');
t.equal(mocksy.stopped, true, 'server is stopped');
mocksy.stop(function () {
// test for already stopped server
t.end();
});
});
});
mocksy.stop(function (err) {
t.equal(mocksy.started, false, 'server is not started');
t.equal(mocksy.stopped, true, 'server is stopped');
t.end();
});
});

@@ -35,0 +41,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