Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for more predicates #5

Open
kristianmandrup opened this issue Jul 13, 2017 · 4 comments
Open

Adding support for more predicates #5

kristianmandrup opened this issue Jul 13, 2017 · 4 comments

Comments

@kristianmandrup
Copy link
Contributor

kristianmandrup commented Jul 13, 2017

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
Copy link
Contributor Author

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

@kristianmandrup
Copy link
Contributor Author

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

@distractdiverge
Copy link

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

@kristianmandrup
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants