mdasberg / ng-apimock

Node plugin that provides the ability to use scenario based api mocking: for local development for protractor testing
MIT License
99 stars 26 forks source link

Expectations #49

Open danpowell88 opened 6 years ago

danpowell88 commented 6 years ago

It would be quite handy to be able to verify the mock was called with certain parameters or certain endpoints were hit, I can't currrently see a way to provide this.

wswebcreation commented 6 years ago

Hi @danpowell88

Isn't this more like a unit test of the source code instead of testing this in ng-apimock?

danpowell88 commented 6 years ago

Yeah I'd think mostly unit testing would cover a lot of it but it is handy in some circumstances to be able to check that the api was called.

nock does it but it doesn't have any kind of nice angular support from what i could tell

https://github.com/node-nock/nock

wswebcreation commented 6 years ago

Tnx for your answer. ng-apimock doesn't have a prebuild assertion in it, but it could be a feature. @mdasberg , what do you think about that?

lucasbento commented 6 years ago

This would be a really good feature, also looking forward for this one.