New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

assert-diff

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assert-diff - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

test/example-failing-tests.js

2

lib/assert-diff.js

@@ -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:
![](https://raw.github.com/pihvi/assert-diff/master/test/example.png)
## License ##
Apache 2.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