deep-equal-in-any-order
Advanced tools
Comparing version 1.1.17 to 1.1.18
@@ -39,2 +39,5 @@ 'use strict'; | ||
}); | ||
chai.assert.deepEqualInAnyOrder = (actual, expected) => chai.expect(actual).to.deep.equalInAnyOrder(expected); | ||
chai.assert.notDeepEqualInAnyOrder = (actual, expected) => chai.expect(actual).to.not.deep.equalInAnyOrder(expected); | ||
}; |
{ | ||
"name": "deep-equal-in-any-order", | ||
"version": "1.1.17", | ||
"version": "1.1.18", | ||
"description": "chai plugin to match objects and arrays deep equality with arrays (including nested ones) being in any order", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -24,2 +24,4 @@ # deep-equal-in-any-order | ||
## usage | ||
### `expect` | ||
```js | ||
@@ -39,1 +41,17 @@ const deepEqualInAnyOrder = require('deep-equal-in-any-order'); | ||
``` | ||
### `assert` | ||
```js | ||
const deepEqualInAnyOrder = require('deep-equal-in-any-order'); | ||
const chai = require('chai'); | ||
chai.use(deepEqualInAnyOrder); | ||
const { assert } = chai; | ||
assert.deepEqualInAnyOrder([1, 2], [2, 1]); | ||
assert.notDeepEqualInAnyOrder(1, 2], [2, 1, 3]); | ||
assert.deepEqualInAnyOrder({ foo: [1, 2], bar: [4, 89, 22] }, { foo: [2, 1], bar: [4, 22, 89] }); | ||
assert.deepEqualInAnyOrder({ foo: ['foo-1', 'foo-2', [1, 2], null ] }, { foo: [null, [1, 2], 'foo-1', 'foo-2'] }); | ||
assert.deepEqualInAnyOrder({ foo: [1, 2], bar: { baz: ['a', 'b', { lorem: [5, 6] }] } }, { foo: [2, 1], bar: { baz: ['b', 'a', { lorem: [6, 5] }] } }); | ||
``` |
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
5206
29
56