Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

deep-equal-ident

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-equal-ident - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

__tests__/chaiIntegration-test.js

7

package.json
{
"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];

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