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

mockuire

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mockuire - npm Package Compare versions

Comparing version 2.0.1 to 2.0.2

test/fixture/baz.js

8

lib/index.js

@@ -27,3 +27,6 @@ const vm = require("vm");

content = arguments[0];
return wrap.apply(this, arguments);
const result = wrap.apply(this, arguments);
// restore orignal wrap function
Module.wrap = wrap;
return result;
}

@@ -34,5 +37,2 @@

// restore orignal wrap function
Module.wrap = wrap;
// add content to local cache.

@@ -39,0 +39,0 @@ cache[file] = content;

@@ -11,3 +11,3 @@ {

],
"version": "2.0.1",
"version": "2.0.2",
"main": "./lib/index.js",

@@ -14,0 +14,0 @@ "dependencies": {

@@ -91,2 +91,8 @@ var path = require("path");

it('should support modules with more than one require', function() {
var mockuire = require("../lib/index")(module);
var baz = mockuire("./fixture/baz");
assert.equal(baz.ping(), 'pong');
});
describe('private members', function() {

@@ -93,0 +99,0 @@ var mockuire = require("../lib/index")(module);

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