@types/supertest
Advanced tools
Comparing version 2.0.8 to 2.0.9
@@ -8,3 +8,3 @@ // Type definitions for SuperTest v2.0.1 | ||
import * as superagent from "superagent" | ||
import * as superagent from 'superagent'; | ||
@@ -15,32 +15,52 @@ export = supertest; | ||
declare namespace supertest { | ||
interface Response extends superagent.Response { | ||
} | ||
interface Response extends superagent.Response {} | ||
interface Request extends superagent.SuperAgentRequest { | ||
} | ||
interface Request extends superagent.SuperAgentRequest {} | ||
type CallbackHandler = (err: any, res: Response) => void; | ||
interface Test extends superagent.SuperAgentRequest { | ||
app?: any; | ||
url: string; | ||
serverAddress(app: any, path: string): string; | ||
expect(status: number, callback?: CallbackHandler): this; | ||
expect(status: number, body: any, callback?: CallbackHandler): this; | ||
expect(checker: (res: Response) => any, callback?: CallbackHandler): this; | ||
expect(body: string, callback?: CallbackHandler): this; | ||
expect(body: RegExp, callback?: CallbackHandler): this; | ||
expect(body: Object, callback?: CallbackHandler): this; | ||
expect(field: string, val: string, callback?: CallbackHandler): this; | ||
expect(field: string, val: RegExp, callback?: CallbackHandler): this; | ||
end(callback?: CallbackHandler): this; | ||
app?: any; | ||
url: string; | ||
serverAddress(app: any, path: string): string; | ||
expect(status: number, callback?: CallbackHandler): this; | ||
expect(status: number, body: any, callback?: CallbackHandler): this; | ||
expect(checker: (res: Response) => any, callback?: CallbackHandler): this; | ||
expect(body: string, callback?: CallbackHandler): this; | ||
expect(body: RegExp, callback?: CallbackHandler): this; | ||
expect(body: Object, callback?: CallbackHandler): this; | ||
expect(field: string, val: string, callback?: CallbackHandler): this; | ||
expect(field: string, val: RegExp, callback?: CallbackHandler): this; | ||
end(callback?: CallbackHandler): this; | ||
} | ||
interface AgentOptions { | ||
ca?: any; | ||
ca?: any; | ||
} | ||
function agent(app?: any, options?: AgentOptions): SuperTest<Test>; | ||
interface SuperTest<T extends superagent.SuperAgentRequest> extends superagent.SuperAgent<T> { | ||
} | ||
function agent( | ||
app?: any, | ||
options?: AgentOptions, | ||
): SuperTest<Test> & | ||
Pick< | ||
Request, | ||
| 'use' | ||
| 'on' | ||
| 'set' | ||
| 'query' | ||
| 'type' | ||
| 'accept' | ||
| 'auth' | ||
| 'withCredentials' | ||
| 'retry' | ||
| 'ok' | ||
| 'redirects' | ||
| 'timeout' | ||
| 'buffer' | ||
| 'serialize' | ||
| 'parse' | ||
| 'ca' | ||
| 'key' | ||
| 'pfx' | ||
| 'cert' | ||
>; | ||
interface SuperTest<T extends superagent.SuperAgentRequest> extends superagent.SuperAgent<T> {} | ||
} |
{ | ||
"name": "@types/supertest", | ||
"version": "2.0.8", | ||
"version": "2.0.9", | ||
"description": "TypeScript definitions for SuperTest", | ||
@@ -19,3 +19,3 @@ "license": "MIT", | ||
"main": "", | ||
"types": "index", | ||
"types": "index.d.ts", | ||
"repository": { | ||
@@ -30,4 +30,4 @@ "type": "git", | ||
}, | ||
"typesPublisherContentHash": "48377f5e98a306562cb7246980a431c036ca720695f2906c49c35308ee68d364", | ||
"typesPublisherContentHash": "f60373a780aa2ebaba2211f23c012b941c40a75c52f2fd3c563085199c384a3b", | ||
"typeScriptVersion": "3.0" | ||
} |
@@ -8,10 +8,10 @@ # Installation | ||
# Details | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/supertest | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/supertest. | ||
Additional Details | ||
* Last updated: Wed, 03 Jul 2019 16:47:17 GMT | ||
* Dependencies: @types/superagent | ||
### Additional Details | ||
* Last updated: Fri, 01 May 2020 19:49:32 GMT | ||
* Dependencies: [@types/superagent](https://npmjs.com/package/@types/superagent) | ||
* Global values: none | ||
# Credits | ||
These definitions were written by Alex Varju <https://github.com/varju>, and Petteri Parkkila <https://github.com/pietu>. | ||
These definitions were written by [Alex Varju](https://github.com/varju), and [Petteri Parkkila](https://github.com/pietu). |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4775
58