MCPcopy
hub / github.com/socketio/socket.io / Assertion

Interface Assertion

test/support/expectjs.d.ts:4–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3declare namespace Expect {
4 interface Assertion {
5 /**
6 * Check if the value is truthy
7 */
8 ok(): void;
9
10 /**
11 * Creates an anonymous function which calls fn with arguments.
12 */
13 withArgs(...args: any[]): Root;
14
15 /**
16 * Assert that the function throws.
17 *
18 * @param fn callback to match error string against
19 */
20 throwError(fn?: (exception: any) => void): void;
21
22 /**
23 * Assert that the function throws.
24 *
25 * @param fn callback to match error string against
26 */
27 throwException(fn?: (exception: any) => void): void;
28
29 /**
30 * Assert that the function throws.
31 *
32 * @param regexp regexp to match error string against
33 */
34 throwError(regexp: RegExp): void;
35
36 /**
37 * Assert that the function throws.
38 *
39 * @param fn callback to match error string against
40 */
41 throwException(regexp: RegExp): void;
42
43 /**
44 * Checks if the array is empty.
45 */
46 empty(): Assertion;
47
48 /**
49 * Checks if the obj exactly equals another.
50 */
51 equal(obj: any): Assertion;
52
53 /**
54 * Checks if the obj sortof equals another.
55 */
56 eql(obj: any): Assertion;
57
58 /**
59 * Assert within start to finish (inclusive).
60 *
61 * @param start

Callers 43

assertFunction · 0.80
socket.tsFile · 0.80
namespaces.tsFile · 0.80
close.tsFile · 0.80
socket.tsFile · 0.80
handlerFunction · 0.80
utility-methods.tsFile · 0.80
messaging-many.tsFile · 0.80
socket.tsFile · 0.80
middleware.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected