mountebank-helper icon indicating copy to clipboard operation
mountebank-helper copied to clipboard

Adding support for more predicates

Open kristianmandrup opened this issue 7 years ago • 4 comments

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 ;)

kristianmandrup avatar Jul 13 '17 09:07 kristianmandrup

Also added a manager branch with a convenience wrapper (DSL) for managing the imposter. Still a WIP, so no PR just yet

kristianmandrup avatar Jul 13 '17 12:07 kristianmandrup

I've also almost got proxy working... see the mb_custom_response_type.test.js

kristianmandrup avatar Jul 13 '17 13:07 kristianmandrup

It looks like the master branch has this functionality present, but it isn't pushed out to npm.

distractdiverge avatar Apr 09 '18 22:04 distractdiverge

@alexlapinski Fork it, improve it, rename it and push it out to npm if you like ;)

kristianmandrup avatar Apr 10 '18 12:04 kristianmandrup