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

muk

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

muk - npm Package Compare versions

Comparing version 0.3.1 to 0.3.2

9

lib/method.js

@@ -16,3 +16,4 @@ // keep track of mocks

key: key,
original: obj[key]
original: obj[key],
exist: key in obj
});

@@ -29,3 +30,7 @@ obj[key] = method === undefined ? function() {} : method;

var m = mocks[i];
m.obj[m.key] = m.original;
if (!m.exist) {
delete m.obj[m.key];
} else {
m.obj[m.key] = m.original;
}
}

@@ -32,0 +37,0 @@ mocks = [];

{
"name": "muk",
"description": "Mock object methods and dependencies.",
"keywords": ["test", "mock", "dependency"],
"version": "0.3.1",
"keywords": [
"test",
"mock",
"dependency"
],
"version": "0.3.2",
"repository": {

@@ -21,6 +25,8 @@ "type": "git",

},
"licenses": [ {
"type": "MIT",
"url" : "http://github.com/fent/node-muk/raw/master/LICENSE"
}]
"licenses": [
{
"type": "MIT",
"url": "http://github.com/fent/node-muk/raw/master/LICENSE"
}
]
}

@@ -79,2 +79,4 @@ var muk = require('..');

muk(config, 'delay', 0);
muk(config, 'notExistProp', 'value');
muk(process.env, 'notExistProp', 0);
muk.restore();

@@ -84,3 +86,9 @@

assert.equal(config.delay, 10, 'delay is 10');
assert(!hasOwnProperty(config, 'notExistProp'), 'notExistProp is deleted');
assert(!hasOwnProperty(process.env, 'notExistProp'), 'notExistProp is deleted');
});
});
});
function hasOwnProperty(obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}

Sorry, the diff of this file is not supported yet

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