assert-diff
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,2 +0,2 @@ | ||
var assert = require('assert') | ||
var assert = require('assert-plus') | ||
var jdiff = require('json-diff') | ||
@@ -3,0 +3,0 @@ |
{ | ||
"name": "assert-diff", | ||
"description": "Drop-in replacement for assert to give diff on deepEqual.", | ||
"keywords": ["assert", "diff", "deepEqual", "object"], | ||
"keywords": ["assert", "diff", "deepEqual", "object", "array"], | ||
"author": "Antti Mattila <pihvi@live.com>", | ||
"repository": "git://github.com/pihvi/assert-diff", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "./lib/assert-diff.js", | ||
"license": "Apache 2.0", | ||
"dependencies": { | ||
"assert-plus": "0.1.4", | ||
"json-diff": "0.3.1" | ||
@@ -12,0 +13,0 @@ }, |
Drop-in replacement for assert to give colored diff on command-line with deepEqual. | ||
This exists to give better diff on error when comparing objects with Mocha. | ||
This exists to give better diff on error when comparing objects or arrays with Mocha. | ||
Should work on *nix shells. | ||
Also has more asserts from https://npmjs.org/package/assert-plus | ||
## Usage ## | ||
@@ -11,6 +13,11 @@ ```javascript | ||
assert.deepEqual({pow: "boom", foo: 2}, {bar: 2, pow: "bang"}) | ||
it('diff deep equal with message', function() { | ||
assert.deepEqual({pow: "boom", same: true, foo: 2}, {same: true, bar: 2, pow: "bang"}, "this should fail") | ||
}) | ||
``` | ||
Should give you: | ||
 | ||
## License ## | ||
Apache 2.0 |
13995
7
57
23
2
+ Addedassert-plus@0.1.4
+ Addedassert-plus@0.1.4(transitive)