Huge News!Announcing our $40M Series B led by Abstract Ventures.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 1.0.1 to 1.1.0

8

package.json

@@ -14,11 +14,11 @@ {

"repository": "git://github.com/pihvi/assert-diff",
"version": "1.0.1",
"version": "1.1.0",
"main": "./lib/assert-diff.js",
"license": "Apache 2.0",
"license": "Apache-2.0",
"dependencies": {
"assert-plus": "0.1.5",
"assert-plus": "1.0.0",
"json-diff": "0.3.1"
},
"devDependencies": {
"mocha": "2.1.0"
"mocha": "3.0.2"
},

@@ -25,0 +25,0 @@ "scripts": {

@@ -38,2 +38,5 @@ Drop-in replacement for assert to give colored diff on command-line with deepEqual.

### 1.1.0 Aug 19, 2016 ###
- Upgrade assert-plus 0.1.5 -> 1.0.0
### 1.0.1 Feb 18, 2015 ###

@@ -40,0 +43,0 @@ - Default behaviour back to non strict to be drop-in replacement for Node assert

@@ -1,41 +0,45 @@

var assert = require('./../lib/assert-diff');
var assertOrig = require('assert');
var assert = require('./../lib/assert-diff')
var assertOrig = require('assert')
it('diff deep equal array', function() {
assert.string('yea');
assert.deepEqual([22, 'loi', {pow: true}], [22, 'lol', {pow: true}]);
})
describe('examples', function() {
it('diff deep equal array', function() {
assert.string('yea')
assert.deepEqual([22, 'loi', {pow: true}], [22, 'lol', {pow: true}])
})
it('original deep equal array', function() {
assertOrig.deepEqual([22, 'loi', {pow: true}], [22, 'lol', {pow: true}]);
})
it('original deep equal array', function() {
assertOrig.deepEqual([22, 'loi', {pow: true}], [22, 'lol', {pow: true}])
})
it('diff deep equal string', function() {
assert.deepEqual('tomato', 'tomeito');
})
it('diff deep equal string', function() {
assert.deepEqual('tomato', 'tomeito')
})
it('original deep equal string', function() {
assertOrig.deepEqual('tomato', 'tomeito', 'hahaa');
})
it('original deep equal string', function() {
assertOrig.deepEqual('tomato', 'tomeito', 'hahaa')
})
it('diff deep equal', function() {
assert.deepEqual({pow: 'boom', same: true, foo: 2}, {same: true, bar: 2, pow: 'bang'});
})
it('diff deep equal', function() {
assert.deepEqual({pow: 'boom', same: true, foo: 2}, {same: true, bar: 2, pow: 'bang'})
})
it('original deep equal', function() {
assertOrig.deepEqual({pow: 'boom', same: true, foo: 2}, {same: true, bar: 2, pow: 'bang'});
})
it('original deep equal', function() {
assertOrig.deepEqual({pow: 'boom', same: true, foo: 2}, {same: true, 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');
})
it('diff deep equal with message', function() {
assert.deepEqual({pow: 'boom', same: true, foo: 2}, {same: true, bar: 2, pow: 'bang'}, 'this should fail')
})
it('strict diff deep equal', function() {
assert.deepEqual({a: 1}, {a: 1}, 'this should not fail');
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 = false;
assert.deepEqual({a: 1, b: 2}, {a: true, b: '2'}, 'this should not fail');
assert.options.strict = true
assert.deepEqual({a: 1, b: 2}, {a: true, b: '2'}, 'this should fail')
})
assert.options.strict = true;
assert.deepEqual({a: 1, b: 2}, {a: true, b: '2'}, 'this should fail');
after(function() {
assert.options.strict = false
})
})

@@ -32,3 +32,5 @@ var assert = require('./../lib/assert-diff')

assert.notEqual(e.actual, 'Should fail on false')
} finally {
assert.options.strict = false
}
})
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