xebia / mock-rest-request

Mock REST requests in NodeJS
https://xebia.com/blog/mocking-a-rest-backend-for-your-angularjs-grunt-web-application/
Apache License 2.0
12 stars 6 forks source link

Adds calls endpoint to access list of mock calls #9

Closed hpgmiskin closed 6 years ago

hpgmiskin commented 6 years ago

I am going to use this mock rest server for use in our testing and would like the ability to check which endpoints have been called. I have added a very basic endpoint which can be used to check all the calls that have been made against the server to give behaviour assertions against the calls on the server.

The following points I was unsure about when creating the server and would appreciate feedback:

  1. Should calls be recorded per mocked request or globally as implemented?
  2. Should the reset endpoint also reset the record of calls?

Feedback very welcome and requirement for edits expected.