// Type definitions for SuperTest as Promised v2.0.2 // Project: https://github.com/WhoopInc/supertest-as-promised // Definitions by: Tanguy Krotoff // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// /// /// 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; namespace supertestAsPromised { interface Request extends supertest.Request { } interface Response extends supertest.Response { } interface Test extends supertest.Test, supersgent.Request { toPromise(): PromiseBlurbird; } function agent(app?: any): SuperTest; interface SuperTest extends supertest.SuperTest { } } export = supertestAsPromised }