UNPKG

2.69 kBTypeScriptView Raw
1/// <reference types="chai" />
2
3declare global {
4 namespace Chai {
5 interface Assertion extends LanguageChains, NumericComparison, TypeComparison {
6 startsWith(expected: string, message?: string): Assertion;
7 startWith(expected: string, message?: string): Assertion;
8 endsWith(expected: string, message?: string): Assertion;
9 endWith(expected: string, message?: string): Assertion;
10 equalIgnoreCase(expected: string, message?: string): Assertion;
11 equalIgnoreSpaces(expected: string, message?: string): Assertion;
12 containIgnoreCase(expected: string, msg?: string): Assertion;
13 containIgnoreSpaces(expected: string, msg?: string): Assertion;
14 singleLine(message?: string): Assertion;
15 reverseOf(message?: string): Assertion;
16 palindrome(message?: string): Assertion;
17 entriesCount(substr: string, expected: number, message?: string): Assertion;
18 indexOf(str: string, substr: string, index: number, msg?: string): Assertion;
19 }
20
21 interface Assert {
22 startsWith(val: string, exp: string, msg?: string): void;
23 notStartsWith(val: string, exp: string, msg?: string): void;
24 endsWith(val: string, exp: string, msg?: string): void;
25 notEndsWith(val: string, exp: string, msg?: string): void;
26 equalIgnoreCase(val: string, exp: string, msg?: string): void;
27 notEqualIgnoreCase(val: string, exp: string, msg?: string): void;
28 equalIgnoreSpaces(val: string, exp: string, msg?: string): void;
29 notEqualIgnoreSpaces(val: string, exp: string, msg?: string): void;
30 containIgnoreCase(val: string, exp: string, msg?: string): void;
31 notContainIgnoreCase(val: string, exp: string, msg?: string): void;
32 containIgnoreSpaces(val: string, exp: string, msg?: string): void;
33 notContainIgnoreSpaces(val: string, exp: string, msg?: string): void;
34 singleLine(val: string, msg?: string): void;
35 notSingleLine(val: string, msg?: string): void;
36 reverseOf(val: string, exp: string, msg?: string): void;
37 notReverseOf(val: string, exp: string, msg?: string): void;
38 palindrome(val: string, msg?: string): void;
39 notPalindrome(val: string, msg?: string): void;
40 entriesCount(str: string, substr: string, count: number, msg?: string): void;
41 indexOf(str: string, substr: string, index: number, msg?: string): void;
42 }
43 }
44}
45
46declare const chaiString: Chai.ChaiPlugin;
47declare namespace chaiString {}
48export = chaiString;