forked from soywiz-archive/typescript-node-definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsupertest.d.ts
More file actions
19 lines (16 loc) · 887 Bytes
/
supertest.d.ts
File metadata and controls
19 lines (16 loc) · 887 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
///<reference path='node.d.ts' />
///<reference path='superagent.d.ts' />
declare module "supertest" {
import supertest = module('supertest');
import superagent = module('superagent');
export class TestRequest extends superagent.Request {
serverAddress(app: any, path: string): TestRequest;
expect(responseCode: number, cb?: (err: Error, res: superagent.Response) => void): TestRequest;
expect(responseBody: string, cb?: (err: Error, res: superagent.Response) => void): TestRequest;
expect(headerKey: string, headerValue: string, cb?: (err: Error, res: superagent.Response) => void): TestRequest;
assert(res: any, cb?: (err: Error, res: superagent.Response) => void);
}
//export function agent(app: any): TestRequest;
export function(app: any) : TestRequest;
export function(url?: string, cb?: (res: superagent.Response) => void) : TestRequest;
}