deep-equal-ident
Advanced tools
Comparing version 0.0.2 to 0.1.0
{ | ||
"name": "deep-equal-ident", | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"description": "A function to test for identical deep equality (based on lodash's isEqual).", | ||
@@ -12,3 +12,5 @@ "main": "index.js", | ||
"equality", | ||
"deep" | ||
"deep", | ||
"chai", | ||
"testing" | ||
], | ||
@@ -21,2 +23,3 @@ "author": "Felix Kling", | ||
"devDependencies": { | ||
"chai": "^1.9.1", | ||
"jest-cli": "^0.1.15" | ||
@@ -23,0 +26,0 @@ }, |
@@ -7,3 +7,4 @@ ##Deep comparison with object identity checks | ||
This function is intended to be used for unit tests. | ||
This function is intended to be used for unit tests (see below how to use it | ||
with chai.js). | ||
@@ -188,1 +189,23 @@ ### So, what is this really about? | ||
npm test | ||
--- | ||
### Use with chai.js | ||
This module provides integration with the [chai.js assertion framework](http://chaijs.com/) | ||
(for Node.js at least). | ||
Enable the extensions with | ||
chai.use(require('deep-equal-ident/chai')); | ||
Then you can use either the `expect` or `assert` interface: | ||
```javascript | ||
// expect | ||
expect(foo).to.deep.identically.equal(bar); | ||
expect(foo).to.identically.eql(bar); | ||
// assert | ||
assert.deepEqualIdent(foo, bar); | ||
assert.NotDeepEqualIdent(foo, bar); | ||
``` |
@@ -7,3 +7,3 @@ /*jshint node:true*/ | ||
describe(name, function() { | ||
it('accepts identitcal structures', function() { | ||
it('accepts identical structures', function() { | ||
var a = [1,2]; | ||
@@ -56,3 +56,3 @@ var b = [1,2]; | ||
it("doesn't accept this weird cross-referential", function() { | ||
it("doesn't accept this weird cross-referential structure", function() { | ||
var a = [1,2,3]; | ||
@@ -59,0 +59,0 @@ var b = [1,2,3]; |
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
18034
13
325
210
2