# @types/sinon-express-mock

> TypeScript definitions for sinon-express-mock

Latest version **1.3.12** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/sinon-express-mock
pnpm add @types/sinon-express-mock
yarn add @types/sinon-express-mock
bun add @types/sinon-express-mock
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.3.12 |
| Published | 2023-11-07 |
| First published | 2017-05-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/sinon-express-mock
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon-express-mock
- npm.io page: https://npm.io/package/@types/sinon-express-mock

## Dependencies (2)

- [@types/sinon](https://npm.io/package/@types/sinon.md) *
- [@types/express](https://npm.io/package/@types/express.md) *

## Recent versions

- 1.3.12 (latest) — 2023-11-07
- 1.3.9 (ts3.2) — 2020-09-26
- 1.3.8 (ts2.8) — 2020-03-31
- 1.3.4 (ts2.3) — 2018-05-10
- 1.3.0 (ts2.2) — 2017-05-03
- 1.3.11 — 2023-10-18
- 1.3.10 — 2023-09-25
- 1.3.7 — 2018-12-12
- 1.3.6 — 2018-11-18
- 1.3.5 — 2018-05-24
- 1.3.3 — 2018-05-09
- 1.3.2 — 2017-08-01
- 1.3.1 — 2017-06-05

## README

# Installation
> `npm install --save @types/sinon-express-mock`

# Summary
This package contains type definitions for sinon-express-mock (https://github.com/danawoodman/sinon-express-mock#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon-express-mock.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sinon-express-mock/index.d.ts)
````ts
import { SinonStub } from "sinon";

import { Request, Response } from "express";

export namespace mockReq {
    interface MockReq {
        accepts: SinonStub;
        acceptsCharsets: SinonStub;
        acceptsEncodings: SinonStub;
        acceptsLanguages: SinonStub;
        body: object;
        flash: SinonStub;
        get: SinonStub;
        is: SinonStub;
        params: object;
        query: object;
        session: object;
    }
}

export namespace mockRes {
    interface MockRes {
        append: SinonStub;
        attachement: SinonStub;
        clearCookie: SinonStub;
        cookie: SinonStub;
        download: SinonStub;
        end: SinonStub;
        format: object;
        get: SinonStub;
        headersSent: SinonStub;
        json: SinonStub;
        jsonp: SinonStub;
        links: SinonStub;
        locals: object;
        location: SinonStub;
        redirect: SinonStub;
        render: SinonStub;
        send: SinonStub;
        sendFile: SinonStub;
        sendStatus: SinonStub;
        set: SinonStub;
        status: SinonStub;
        type: SinonStub;
        vary: SinonStub;
    }
}

export function mockReq<T extends object>(options?: T): mockReq.MockReq & T & Request;

export function mockRes<T extends object>(options?: T): mockRes.MockRes & T & Response;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/sinon](https://npmjs.com/package/@types/sinon)

# Credits
These definitions were written by [Jared Chapiewsky](https://github.com/jpchip), and [Tomek Łaziuk](https://github.com/tlaziuk).

---
_Source: https://npm.io/package/@types/sinon-express-mock · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
