Socket
Socket
Sign inDemoInstall

empower

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

empower - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

6

bower.json
{
"name": "empower",
"version": "0.7.0",
"version": "0.7.1",
"main": "lib/empower.js",

@@ -15,3 +15,3 @@ "ignore": [

"espower": "~0.7.0",
"esprima": "~1.2.0",
"esprima": "~1.2.1",
"escodegen": "1.3.0",

@@ -24,4 +24,4 @@ "mocha": "~1.18.2",

"resolutions": {
"esprima": "1.2.0"
"esprima": "~1.2.1"
}
}

@@ -183,3 +183,3 @@ /**

function isEspoweredValue (value) {
return (typeof value !== 'undefined') && (typeof value.powerAssertContext !== 'undefined');
return (typeof value === 'object') && (value !== null) && (typeof value.powerAssertContext !== 'undefined');
}

@@ -186,0 +186,0 @@

{
"name": "empower",
"description": "Power Assert feature enhancer for assert function/object",
"version": "0.7.0",
"version": "0.7.1",
"keywords": [

@@ -6,0 +6,0 @@ "power-assert",

@@ -61,2 +61,35 @@ (function (root, factory) {

test('Bug reproduction. should not fail if argument is null Literal. ' + JSON.stringify(option), function () {
var foo = 'foo';
try {
eval(weave('assert.equal(foo, null);'));
assert.ok(false, 'AssertionError should be thrown');
} catch (e) {
baseAssert.equal(e.name, 'AssertionError');
if (option.modifyMessageOnFail) {
baseAssert.equal(e.message, [
'/path/to/some_test.js',
'assert.equal(foo, null)',
'[{"value":"foo","espath":"arguments/0"}]'
].join('\n'));
}
if (option.saveContextOnFail) {
baseAssert.deepEqual(e.powerAssertContext, {
"source":{
"content":"assert.equal(foo, null)",
"filepath":"/path/to/some_test.js",
"line": 1
},
"args":[
{
"value":"foo",
"events":[{"value":"foo","espath":"arguments/0"}]
}
]
});
}
}
});
test(JSON.stringify(option) + ' empowered function also acts like an assert function', function () {

@@ -63,0 +96,0 @@ var falsy = 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