-
Notifications
You must be signed in to change notification settings - Fork 11
/
chai-exclude.d.ts
34 lines (30 loc) · 1.23 KB
/
chai-exclude.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/// <reference types="@types/chai" />
declare module 'chai-exclude' {
export default function chaiExclude(chai: Chai.ChaiStatic, utils: Chai.ChaiUtils): void;
}
declare namespace Chai {
interface Assertion extends LanguageChains, NumericComparison, TypeComparison {
excluding(props: string | string[]): Assertion;
excludingEvery(props: string | string[]): Assertion;
}
interface Assert {
/**
* Asserts that actual is deeply equal to expected excluding some top level properties.
*
* @param actual Actual value.
* @param expected Expected value.
* @param props Properties or keys to exclude.
* @param message Message to display on error.
*/
deepEqualExcluding<T>(actual: T | T[], expected: T | T[], props: keyof T | (keyof T)[], message?: string): void;
/**
* Asserts that actual is deeply equal to expected excluding properties any level deep.
*
* @param actual Actual value.
* @param expected Expected value.
* @param props Properties or keys to exclude.
* @param message Message to display on error.
*/
deepEqualExcludingEvery<T>(actual: T | T[], expected: T | T[], props: keyof T | (keyof T)[], message?: string): void;
}
}