-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
53 lines (51 loc) · 1.52 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
interface MockFunction extends Function {
_isMockFunction: boolean;
mock: {
calls: any[][];
results: any[];
};
mockName: (name: string) => void;
getMockName: () => string;
mockReset: () => void;
}
interface BenchmarkTools {
N: number;
resetTimer: () => void;
}
declare var describe: ((desc: string, cb: () => any | Promise<any>) => void) & {
each: (
cases: any[]
) => (desc: string, cb: (...args: any[]) => any | Promise<any>) => void;
skip: (desc: string, cb: () => any | Promise<any>) => void;
};
declare var test: ((desc: string, cb: () => any | Promise<any>) => void) & {
each: (
cases: any[]
) => (desc: string, cb: (...args: any[]) => any | Promise<any>) => void;
skip: (desc: string, cb: () => any | Promise<any>) => void;
};
declare var benchmark: ((
desc: string,
cb: (b: BenchmarkTools) => any | Promise<any>
) => void) & {
each: (
cases: any[]
) => (
desc: string,
cb: (b: BenchmarkTools, ...args: any[]) => any | Promise<any>
) => void;
skip: (
desc: string,
cb: (b: BenchmarkTools) => any | Promise<any>
) => any | Promise<any>;
};
declare var it: typeof test;
declare var beforeAll: (cb: () => any | Promise<any>) => void;
declare var afterAll: (cb: () => any | Promise<any>) => void;
declare var beforeEach: (cb: () => any | Promise<any>) => void;
declare var afterEach: (cb: () => any | Promise<any>) => void;
declare var expect: typeof import("expect");
declare var jest: {
fn: (impl?: (...args: any[]) => any) => MockFunction;
resetAllMocks: () => void;
};