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

Ability to specify a delayed response #102

Open
robertbird opened this issue Jun 2, 2016 · 1 comment
Open

Ability to specify a delayed response #102

robertbird opened this issue Jun 2, 2016 · 1 comment

Comments

@robertbird
Copy link

Hi there,

This looks like a great mocking framework and exactly what I need for testing, so thanks for putting in all the hard work and sharing this! However I am looking to be able to simulate quite slow services with latency etc. So it would be a really great feature to be able to add a comment to set a delay

i.e. for 2000ms delay
//! delay: 2000

I know the obvious answer is to have a look myself and submit a pull request. So I will try if I get a chance, but I am new to node, so not sure if in reality I will or not. So just thought I would raise the suggestion.

Any tips on a starting point to implement this would also be great! :)

Cheers,
Rob

@sideshowcoder
Copy link
Owner

Thanks for the feedback, and glad you find it helpful. I think this would be a great thing to support indeed, in the meantime you can probably achieve this quickly now by doing something like

https://github.com/flesler/connect-pause/blob/master/index.js

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

No branches or pull requests

2 participants