assert-diff
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -8,3 +8,3 @@ var assert = require('assert-plus'); | ||
AssertDiff.options = { strict: true }; | ||
AssertDiff.options = {strict: false}; | ||
@@ -23,3 +23,3 @@ Object.keys(assert).forEach(function(k) { | ||
delete e.expected; | ||
delete e.actualQ; | ||
delete e.actual; | ||
throw e; | ||
@@ -26,0 +26,0 @@ } |
@@ -14,3 +14,3 @@ { | ||
"repository": "git://github.com/pihvi/assert-diff", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "./lib/assert-diff.js", | ||
@@ -17,0 +17,0 @@ "license": "Apache 2.0", |
@@ -38,2 +38,5 @@ Drop-in replacement for assert to give colored diff on command-line with deepEqual. | ||
### 1.0.1 Feb 18, 2015 ### | ||
- Default behaviour back to non strict to be drop-in replacement for Node assert | ||
### 1.0.0 Feb 18, 2015 ### | ||
@@ -40,0 +43,0 @@ - Support assert in constructor e.g. assert(true) |
@@ -20,1 +20,15 @@ var assert = require('./../lib/assert-diff') | ||
}) | ||
it('strict diff deep equal', function() { | ||
assert.deepEqual({a: 1}, {a: 1}, 'this should not fail') | ||
assert.deepEqual({a: 1, b: 2}, {a: true, b: '2'}, 'this should not fail') | ||
assert.options.strict = true | ||
assertOrig.deepEqual({a: 1, b: 2}, {a: true, b: '2'}, 'this should not fail') | ||
try { | ||
assert.deepEqual({a: 1, b: 2}, {a: true, b: '2'}, 'this should fail') | ||
assert.fail('Should fail on false') | ||
} catch (e) { | ||
assert.notEqual(e.actual, 'Should fail on false') | ||
} | ||
}) |
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
27936
107
49