{"_id":"@depup/sinon-express-mock","name":"@depup/sinon-express-mock","dist-tags":{"latest":"2.2.1-depup.0"},"versions":{"2.2.1-depup.0":{"name":"@depup/sinon-express-mock","version":"2.2.1-depup.0","description":"Simple request and response mock objects to pass into Express routes when testing using Sinon. (with updated dependencies)","main":"lib/index.js","directories":{"test":"test"},"scripts":{"build":"babel -d lib src","test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/danawoodman/sinon-express-mock.git"},"bugs":{"url":"https://github.com/danawoodman/sinon-express-mock/issues"},"homepage":"https://github.com/danawoodman/sinon-express-mock#readme","keywords":["sinon-express-mock","depup","updated-dependencies","security","latest","patched","express","mock","test","request","response","req","res","spec","mocha","sinon","spy"],"author":{"name":"Dana Woodman","email":"dana@danawoodman.com","url":"danawoodman.com"},"license":"MIT","peerDependencies":{"sinon":"*"},"devDependencies":{"babel-cli":"6.2.0","babel-preset-es2015":"6.1.18","sinon":"*"},"depup":{"changes":{},"depsUpdated":0,"originalPackage":"sinon-express-mock","originalVersion":"2.2.1","processedAt":"2026-03-19T03:29:29.872Z","smokeTest":"failed"},"gitHead":"fc48af8747a3d07c43d92d6fc0c11144fe675191","_id":"@depup/sinon-express-mock@2.2.1-depup.0","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-/RVZeVe8EGWeK7j4QJ/AZS/+jtqpH7UdBO1KjzdH808Wey62X4Qy6nvECb+B/nWBm8RQ1VGuVqWyBxNAVWya+A==","shasum":"cc4303fa9d5dcd6cadc1d3bd0409ba484eb72ea8","tarball":"https://registry.npmjs.org/@depup/sinon-express-mock/-/sinon-express-mock-2.2.1-depup.0.tgz","fileCount":9,"unpackedSize":8776,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDR2iCD9UBCh4KM9DUW2VMBYOUIN7N79cObH3rrLJHjlAIgCicKnsKvHpdyUdrycXrBSE3BstvI30yUh0xOKSIWovw="}]},"_npmUser":{"name":"chiefmikey","email":"wolfemikl@gmail.com"},"maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sinon-express-mock_2.2.1-depup.0_1773890977831_0.5377288773169919"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-19T03:29:37.734Z","2.2.1-depup.0":"2026-03-19T03:29:37.975Z","modified":"2026-03-19T03:29:38.192Z"},"maintainers":[{"name":"chiefmikey","email":"wolfemikl@gmail.com"}],"description":"Simple request and response mock objects to pass into Express routes when testing using Sinon. (with updated dependencies)","homepage":"https://github.com/danawoodman/sinon-express-mock#readme","keywords":["sinon-express-mock","depup","updated-dependencies","security","latest","patched","express","mock","test","request","response","req","res","spec","mocha","sinon","spy"],"repository":{"type":"git","url":"git+https://github.com/danawoodman/sinon-express-mock.git"},"author":{"name":"Dana Woodman","email":"dana@danawoodman.com","url":"danawoodman.com"},"bugs":{"url":"https://github.com/danawoodman/sinon-express-mock/issues"},"license":"MIT","readme":"# sinon-express-mock\n\nSimple request and response mock objects to pass into Express routes when testing using Sinon.\n\nThe mock objects attach Sinon spys to request methods. See `src/index.js` for a full list of stubbed out methods.\n\n## Install\n\n```shell\nnpm install --save-dev sinon-express-mock sinon\n```\n\nDepends on:\n\n* Node v4+ (or `Object.assign` support needed)\n* Sinon\n\n## Usage\n\nContents of `src/foo.js`:\n\n```js\nexport default (req, res) => {\n  res.json({ foo: req.body.foo })\n}\n```\n\nContents of `test/foo-test.js`:\n\n```js\nimport route from '../src/foo'\nimport chai, { expect } from 'chai'\nimport sinonChai from 'sinon-chai'\nimport { mockReq, mockRes } from 'sinon-express-mock'\n\nchai.use(sinonChai);\n\ndescribe('my route', () => {\n  it('should foo the bar', () => {\n    const request = {\n      body: {\n        foo: 'bar',\n      },\n    }\n    const req = mockReq(request)\n    const res = mockRes()\n\n    route(req, res)\n\n    expect(res.json).to.be.calledWith({ foo: request.body.foo })\n  })\n})\n```\n\n## Changelog\n\n### v2.0.3\n\n* `res.write()` is now stubbed.\n\n### v2.0.0\n\n* Make sinon a `peerDependency`.\n\n### v1.3.1\n\n* Bundle fix from #3\n\n### pre v1.3.1\n\n* Changelog didn't exist! 😱\n\n## Credits\n\nDana Woodman and [contributors](https://github.com/danawoodman/sinon-express-mock/graphs/contributors)\n\n## License\n\nMIT\n","readmeFilename":"readme.md","_rev":"1-f46862de8ad673a64927292200649666"}