mountebank-helper
mountebank-helper copied to clipboard
Adding support for more predicates
I see that you currently only support matches
as noted in the Readme.
const mbPredicate = Imposter._createPredicate('matches', { 'method' : verb, 'path' : route } );
Doesn't look too difficult to add support for more predicates. Any reason you left it at matches
only? What are your recommendations? Perhaps using a Predicate
class to avoid bloating the main class further?
I've added a PR with this feature added ;)
Also added a manager branch with a convenience wrapper (DSL) for managing the imposter. Still a WIP, so no PR just yet
I've also almost got proxy working... see the mb_custom_response_type.test.js
It looks like the master branch has this functionality present, but it isn't pushed out to npm.
@alexlapinski Fork it, improve it, rename it and push it out to npm if you like ;)