-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.d.ts
56 lines (45 loc) · 1.3 KB
/
index.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
/**
* Load a file from path.
*/
export function load(path: string): string;
/**
* Run script.
*/
export function runScript(path: string): void;
/**
* Mock a library for require.
*/
export function mock(path: string, object: unknown): void;
/**
* Assert that the value is true.
*/
export function assertTrue(actual: boolean, message?: string): void;
/**
* Assert that the value is false.
*/
export function assertFalse(actual: boolean, message?: string): void;
/**
* Assert that the expected == actual.
*/
export function assertEquals<A extends Primitive | null>(expected: A, actual: A, message?: string): void;
/**
* Assert that the expected != actual.
*/
export function assertNotEquals<A extends Primitive | null>(expected: A, actual: A, message?: string): void;
/**
* Assert that the JSON expected == actual.
*/
export function assertJson<A>(expected: A, actual: A, message?: string): void;
/**
* Assert that the JSON expected == actual.
*/
export function assertJsonEquals<A>(expected: A, actual: A, message?: string): void;
/**
* Assert null.
*/
export function assertNull(value: unknown, message?: string): void;
/**
* Assert not null.
*/
export function assertNotNull(value: unknown, message?: string): void;
export type Primitive = string | number | bigint | boolean | undefined | symbol;