forked from open-wc/open-wc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chai-dom-diff-plugin.d.ts
37 lines (31 loc) · 1.52 KB
/
chai-dom-diff-plugin.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
35
36
37
/// <reference types="chai" />
import { DiffOptions } from './get-diffable-html';
declare global {
namespace Chai {
interface Assertion extends LanguageChains, NumericComparison, TypeComparison {
dom: Assertion;
lightDom: Assertion;
shadowDom: Assertion;
notEqual(actual: Object, expected: Object, message?: string): void;
equalSnapshot(options?: Object): Assertion;
notEqualSnapshot(options?: Object): Assertion;
}
interface Assert {
dom: Pick<Assertion, 'equal' | 'notEqual' | 'equalSnapshot' | 'notEqualSnapshot'>;
lightDom: Pick<Assertion, 'equal' | 'notEqual' | 'equalSnapshot' | 'notEqualSnapshot'>;
shadowDom: Pick<Assertion, 'equal' | 'notEqual' | 'equalSnapshot' | 'notEqualSnapshot'>;
equalSnapshot(fixture: unknown, options?: DiffOptions): Assertion;
notEqualSnapshot(fixture: unknown, options?: DiffOptions): Assertion;
equal<T>(actual: T, expected: T, message?: string, options?: DiffOptions): void;
equal<T>(actual: T, expected: T, message?: string): void;
equal<T>(actual: T, expected: T, options?: DiffOptions): void;
notEqual<T>(actual: T, expected: T, message?: string, options?: DiffOptions): void;
notEqual<T>(actual: T, expected: T, message?: string): void;
notEqual<T>(actual: T, expected: T, options?: DiffOptions): void;
}
interface Equal {
(value: unknown, message?: string, options?: DiffOptions): Promise<Assertion>;
(value: unknown, options?: DiffOptions): Promise<Assertion>;
}
}
}