mock-req-res

JSON →
library 1.2.1 ·javascript
verified May 27, 2026

Library for creating mock Express request and response objects for unit testing controllers and middleware. Version 1.2.1 works with Sinon >10.0.0 and Node >=8.10.0. Provides mockRequest and mockResponse functions that return sinon stubs/spies for all standard Express req/res properties. Supports extensibility via options parameter. Lightweight and focused on isolated unit tests, unlike full integration tools like supertest. Includes TypeScript definitions via @types/mock-req-res. Release cadence is slow, with minor updates as needed.

total hits 17
actors 7 distinct systems
last hit 1d ago AhrefsBot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇳🇴 Norway · 🇩🇪 Germany · 🇬🇧 United Kingdom