Socket
Socket
Sign inDemoInstall

sinon-express-mock

Package Overview
Dependencies
19
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.1 to 2.0.0

.prettierrc

6

package.json
{
"name": "sinon-express-mock",
"version": "1.3.1",
"version": "2.0.0",
"description": "Simple request and response mock objects to pass into Express routes when testing using Sinon.",

@@ -40,4 +40,4 @@ "main": "lib/index.js",

"license": "MIT",
"dependencies": {
"sinon": "1.17.2"
"peerDependencies": {
"sinon": "4.1.3"
},

@@ -44,0 +44,0 @@ "devDependencies": {

@@ -10,3 +10,3 @@ # sinon-express-mock

```shell
npm install --save-dev sinon-express-mock
npm install --save-dev sinon-express-mock sinon
```

@@ -16,6 +16,5 @@

- Node v4+ (or `Object.assign` support needed)
- Sinon
* Node v4+ (or `Object.assign` support needed)
* Sinon
## Usage

@@ -27,3 +26,3 @@

export default (req, res) => {
res.json({ foo: req.body.bar })
res.json({ foo: req.body.foo })
}

@@ -41,3 +40,2 @@ ```

it('should foo the bar', () => {
const request = {

@@ -53,3 +51,3 @@ body: {

expect(res.json).to.be.calledWith({ foo: request.body.foo.bar })
expect(res.json).to.be.calledWith({ foo: request.body.foo })
})

@@ -61,11 +59,14 @@ })

### v2.0.0
* Make sinon a `peerDependency`.
### v1.3.1
- Bundle fix from #3
* Bundle fix from #3
### pre v1.3.1
- Changelog didn't exist! 😱
* Changelog didn't exist! 😱
## Credits

@@ -75,5 +76,4 @@

## License
MIT
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc