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

chai-exclude

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chai-exclude - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

24

lib/chai-exclude.d.ts

@@ -14,2 +14,26 @@ /// <reference types="chai" />

}
interface Assert {
/**
* Asserts that actual is deeply equal to expected excluding some top level properties.
*
* @type T Type of the objects.
* @param actual Actual value.
* @param expected Potential expected value.
* @param props Properties or keys to exclude.
* @param message Message to display on error.
*/
deepEqualExcluding<T>(actual: T, expected: T, props: string | string[], message?: string): void;
/**
* Asserts that actual is deeply equal to expected excluding properties any level deep.
*
* @type T Type of the objects.
* @param actual Actual value.
* @param expected Potential expected value.
* @param props Properties or keys to exclude.
* @param message Message to display on error.
*/
deepEqualExcludingEvery<T>(actual: T, expected: T, props: string | string[], message?: string): void;
}
}

8

lib/chai-exclude.js

@@ -126,4 +126,4 @@ module.exports = (chai, utils) => {

*/
utils.addMethod(assert, 'deepEqualExcluding', function (act, exp, props, msg) {
new Assertion(act, msg).excluding(props).to.deep.equal(exp)
utils.addMethod(assert, 'deepEqualExcluding', function (actual, expected, props, message) {
new Assertion(actual, message).excluding(props).to.deep.equal(expected)
})

@@ -134,4 +134,4 @@

*/
utils.addMethod(assert, 'deepEqualExcludingEvery', function (act, exp, props, msg) {
new Assertion(act, msg).excludingEvery(props).to.deep.equal(exp)
utils.addMethod(assert, 'deepEqualExcludingEvery', function (actual, expected, props, message) {
new Assertion(actual, message).excludingEvery(props).to.deep.equal(expected)
})

@@ -138,0 +138,0 @@

{
"name": "chai-exclude",
"version": "1.0.6",
"version": "1.0.7",
"description": "Exclude keys to compare from a deep equal operation with chai expect and assert",

@@ -5,0 +5,0 @@ "main": "lib/chai-exclude.js",

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