forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
supertest-as-promised.d.ts
36 lines (27 loc) · 1.11 KB
/
supertest-as-promised.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
// Type definitions for SuperTest as Promised v2.0.2
// Project: https://github.com/WhoopInc/supertest-as-promised
// Definitions by: Tanguy Krotoff <https://github.com/tkrotoff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path='../superagent/superagent.d.ts' />
/// <reference path='../supertest/supertest.d.ts' />
/// <reference path='../bluebird/bluebird.d.ts' />
declare module "supertest-as-promised" {
import * as supertest from "supertest";
import * as supersgent from "superagent";
import { SuperTest, Response } from "supertest";
import * as PromiseBlurbird from "bluebird";
function supertestAsPromised(app: any): SuperTest<supertestAsPromised.Test>;
namespace supertestAsPromised {
interface Request extends supertest.Request {
}
interface Response extends supertest.Response {
}
interface Test extends supertest.Test, supersgent.Request {
toPromise(): PromiseBlurbird<Response>;
}
function agent(app?: any): SuperTest<Test>;
interface SuperTest<T> extends supertest.SuperTest<T> {
}
}
export = supertestAsPromised
}