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

rewire

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rewire - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

4

CHANGELOG.md
Changelog
---------
### 2.1.2
- Fixed missing `var` statement which lead to pollution of global namespace [#33](https://github.com/jhnns/rewire/pull/33)
### 2.1.1

@@ -5,0 +9,0 @@ - Made magic `__set__`, `__get__` and `__with__` not enumerable [#32](https://github.com/jhnns/rewire/pull/32)

3

lib/rewire.js

@@ -22,3 +22,4 @@ var Module = require("module"),

prelude,
appendix;
appendix,
src;

@@ -25,0 +26,0 @@ // Checking params

{
"name" : "rewire",
"version" : "2.1.1",
"version" : "2.1.2",
"description" : "Easy dependency injection for node.js unit testing",

@@ -5,0 +5,0 @@ "keywords" : [

@@ -19,2 +19,10 @@ // Don't run code in ES5 strict mode.

});
it("should keep not leak globals", function () {
// This test should run first, as the global space may be already polluted if
// require("../") is run before this test.
var originalGlobalKeys = Object.keys(global),
rewire = require("../"),
emptyModule = rewire("./testModules/emptyModule.js");
expect(Object.keys(global)).to.eql(originalGlobalKeys);
});
it("should pass all shared test cases", function () {

@@ -21,0 +29,0 @@ require("./testModules/sharedTestCases.js");

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