-
Notifications
You must be signed in to change notification settings - Fork 93
/
supertest.d.ts
50 lines (45 loc) · 1.74 KB
/
supertest.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
/// <reference path='./superagent.d.ts' />
declare module "supertest"
{
import superagent = require('superagent');
module supertest {
interface Test extends superagent.Request {
url: string;
serverAddress(app: any, path: string): string;
expect(status: number, callback?: (err: Error, res: superagent.Response) => void): Test;
expect(status: number, body: string, callback?: (err: Error, res: superagent.Response) => void): Test;
expect(body: string, callback?: (err: Error, res: superagent.Response) => void): Test;
expect(body: RegExp, callback?: (err: Error, res: superagent.Response) => void): Test;
expect(body: Object, callback?: (err: Error, res: superagent.Response) => void): Test;
expect(field: string, val: string, callback?: (err: Error, res: superagent.Response) => void): Test;
expect(field: string, val: RegExp, callback?: (err: Error, res: superagent.Response) => void): Test;
}
interface SuperTest {
get(url: string): Test;
post(url: string): Test;
put(url: string): Test;
head(url: string): Test;
del(url: string): Test;
options(url: string): Test;
trace(url: string): Test;
copy(url: string): Test;
lock(url: string): Test;
mkcol(url: string): Test;
move(url: string): Test;
propfind(url: string): Test;
proppatch(url: string): Test;
unlock(url: string): Test;
report(url: string): Test;
mkactivity(url: string): Test;
checkout(url: string): Test;
merge(url: string): Test;
//m-search(url: string): Test;
notify(url: string): Test;
subscribe(url: string): Test;
unsubscribe(url: string): Test;
patch(url: string): Test;
}
}
function supertest(app: any): supertest.SuperTest;
export = supertest;
}