Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "empower", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"main": "lib/empower.js", | ||
@@ -5,0 +5,0 @@ "ignore": [ |
@@ -29,2 +29,3 @@ /** | ||
var isPhantom = typeof window !== 'undefined' && typeof window.callPhantom === 'function'; | ||
@@ -109,2 +110,3 @@ function defaultOptions () { | ||
doPowerAssert = function (baseAssert, args, message, context) { | ||
var f; | ||
if (eagerEvaluation) { | ||
@@ -121,12 +123,25 @@ args.push(buildPowerAssertText(message, context)); | ||
} | ||
if (typeof target.AssertionError !== 'function') { | ||
throw e; | ||
} | ||
if (isPhantom) { | ||
f = new target.AssertionError({ | ||
actual: e.actual, | ||
expected: e.expected, | ||
operator: e.operator, | ||
message: e.message | ||
}); | ||
} else { | ||
f = e; | ||
} | ||
if (config.modifyMessageOnFail) { | ||
e.message = buildPowerAssertText(message, context); | ||
f.message = buildPowerAssertText(message, context); | ||
if (typeof e.generatedMessage !== 'undefined') { | ||
e.generatedMessage = false; | ||
f.generatedMessage = false; | ||
} | ||
} | ||
if (config.saveContextOnFail) { | ||
e.powerAssertContext = context; | ||
f.powerAssertContext = context; | ||
} | ||
throw e; | ||
throw f; | ||
} | ||
@@ -133,0 +148,0 @@ }, |
{ | ||
"name": "empower", | ||
"description": "Power Assert feature enhancer for assert function/object", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "test", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43688
954