Socket
Socket
Sign inDemoInstall

@types/supertest

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/supertest - npm Package Compare versions

Comparing version 2.0.11 to 2.0.12

9

supertest/index.d.ts

@@ -39,3 +39,7 @@ // Type definitions for SuperTest v2.0.1

type SuperAgentTest = SuperTest<Test> &
interface SuperTest<T extends superagent.SuperAgentRequest> extends superagent.SuperAgent<T> {}
interface SuperTestWithHost<T extends superagent.SuperAgentRequest> extends SuperTest<T> {
host(host: string): this;
}
type SuperAgentTest = SuperTestWithHost<Test> &
Pick<

@@ -63,5 +67,2 @@ Request,

>;
interface SuperTest<T extends superagent.SuperAgentRequest> extends superagent.SuperAgent<T> {
host(host: string): T;
}
}
{
"name": "@types/supertest",
"version": "2.0.11",
"version": "2.0.12",
"description": "TypeScript definitions for SuperTest",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/supertest",
"license": "MIT",

@@ -29,4 +30,4 @@ "contributors": [

},
"typesPublisherContentHash": "0f31fa99a5ee4543e053b2a6928741a84d93c4f67e162ac77fb4c5c499cb1a6f",
"typeScriptVersion": "3.5"
"typesPublisherContentHash": "a9c03b8b784744a21299096512e25ca14734512feab0840cca2849df0374d794",
"typeScriptVersion": "3.9"
}

@@ -9,5 +9,75 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/supertest.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/supertest/index.d.ts)
````ts
// Type definitions for SuperTest v2.0.1
// Project: https://github.com/visionmedia/supertest
// Definitions by: Alex Varju <https://github.com/varju>
// Petteri Parkkila <https://github.com/pietu>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.0
import * as superagent from 'superagent';
export = supertest;
declare function supertest(app: any): supertest.SuperTest<supertest.Test>;
declare namespace supertest {
interface Response extends superagent.Response {}
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;
}
interface AgentOptions {
ca?: any;
}
function agent(app?: any, options?: AgentOptions): SuperAgentTest;
interface SuperTest<T extends superagent.SuperAgentRequest> extends superagent.SuperAgent<T> {}
interface SuperTestWithHost<T extends superagent.SuperAgentRequest> extends SuperTest<T> {
host(host: string): this;
}
type SuperAgentTest = SuperTestWithHost<Test> &
Pick<
Request,
| 'use'
| 'on'
| 'set'
| 'query'
| 'type'
| 'accept'
| 'auth'
| 'withCredentials'
| 'retry'
| 'ok'
| 'redirects'
| 'timeout'
| 'buffer'
| 'serialize'
| 'parse'
| 'ca'
| 'key'
| 'pfx'
| 'cert'
>;
}
````
### Additional Details
* Last updated: Wed, 31 Mar 2021 04:31:11 GMT
* Last updated: Mon, 21 Mar 2022 16:31:45 GMT
* Dependencies: [@types/superagent](https://npmjs.com/package/@types/superagent)

@@ -14,0 +84,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc