forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chai-fuzzy.d.ts
76 lines (71 loc) · 2.62 KB
/
chai-fuzzy.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Type definitions for chai-fuzzy 1.3.0
// Project: http://chaijs.com/plugins/chai-fuzzy
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
///<reference path="../chai/chai.d.ts" />
declare namespace Chai {
interface Assertion {
/**
* Compare object attributes and values rather than checking to see if
* they're the same reference.
*/
like(expected: any, message?: string): Assertion;
/**
* Compare object attributes and values rather than checking to see if
* they're the same reference.
*/
notLike(expected: any, message?: string): Assertion;
/**
* Check the first level of the container for a value like the one provided.
*/
containOneLike(expected: any, message?: string): Assertion;
/**
* Check the first level of the container for a value like the one provided.
*/
notContainOneLike(expected: any, message?: string): Assertion;
/**
* Check that the given javascript object is like the JSON-ified expected
* value. Useful for checking stringification and parsing of an object.
*/
jsonOf(expected: any, message?: string): Assertion;
/**
* Check that the given javascript object is like the JSON-ified expected
* value. Useful for checking stringification and parsing of an object.
*/
notJsonOf(expected: any, message?: string): Assertion;
}
export interface Assert {
/**
* Compare object attributes and values rather than checking to see if
* they're the same reference.
*/
like(actual: any, expected: any, message?: string): void;
/**
* Compare object attributes and values rather than checking to see if
* they're the same reference.
*/
notLike(actual: any, expected: any, message?: string): void;
/**
* Check the first level of the container for a value like the one provided.
*/
containOneLike(actual: any, expected: any, message?: string): void;
/**
* Check the first level of the container for a value like the one provided.
*/
notContainOneLike(actual: any, expected: any, message?: string): void;
/**
* Check that the given javascript object is like the JSON-ified expected
* value. Useful for checking stringification and parsing of an object.
*/
jsonOf(actual: any, expected: any, message?: string): void;
/**
* Check that the given javascript object is like the JSON-ified expected
* value. Useful for checking stringification and parsing of an object.
*/
notJsonOf(actual: any, expected: any, message?: string): void;
}
}
declare module "chai-fuzzy" {
function chaiFuzzy(chai: any, utils: any): void;
export = chaiFuzzy;
}