deep-equal-in-any-order
Advanced tools
Comparing version 1.0.18 to 1.0.19
@@ -27,11 +27,14 @@ 'use strict'; | ||
const { Assertion } = chai; | ||
utils.addMethod(Assertion.prototype, 'equalInAnyOrder', function equalInAnyOrder(b) { | ||
utils.addMethod(Assertion.prototype, 'equalInAnyOrder', function equalInAnyOrder(b, m) { | ||
const a = this.__flags.object; | ||
const { negate } = this.__flags; | ||
const { negate, message } = this.__flags; | ||
const msg = m || message; | ||
if (negate) { | ||
new Assertion(sortDeep(a)).to.not.deep.equal(sortDeep(b)); | ||
new Assertion(sortDeep(a), msg).to.not.deep.equal(sortDeep(b)); | ||
} else { | ||
new Assertion(sortDeep(a)).to.deep.equal(sortDeep(b)); | ||
new Assertion(sortDeep(a), msg).to.deep.equal(sortDeep(b)); | ||
} | ||
}); | ||
}; |
{ | ||
"name": "deep-equal-in-any-order", | ||
"version": "1.0.18", | ||
"version": "1.0.19", | ||
"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", |
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
4156
27