xetorthio / shmock

Simple HTTP Mocking Library
MIT License
101 stars 20 forks source link

Add ability to use an arbitrary number of custom Express middlewares #11

Closed Joe8Bit closed 9 years ago

Joe8Bit commented 9 years ago

This new feature came out of a projects needs, we wanted to integrate complex request logging for our mocks, to see which calls are being made with what params/headers/etc, up till now there wasn't an easy of doing this.

Now users can specify an array of custom Express middlewares they want shmock to use. They're added at config time and are added simply by iterating them and using Express's .use().

Tests and documentation also added.