Skip to content

Add support for delaying responses to mimic real APIs.#29

Open
austburn wants to merge 1 commit intolocalmed:masterfrom
austburn:api-response-delay
Open

Add support for delaying responses to mimic real APIs.#29
austburn wants to merge 1 commit intolocalmed:masterfrom
austburn:api-response-delay

Conversation

@austburn
Copy link
Copy Markdown

No description provided.

@austburn
Copy link
Copy Markdown
Author

Wondering what your thoughts might be on this. I'm not too familiar with coffeescript/sinon, so I may need help testing if approved.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling f21ea26 on austburn:api-response-delay into 698898d on localmed:master.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not familiar with coffeescript, but this does produce some weirdness when compiled:

return setTimeout((function() {
    return res.send(response.status, response.body);
}), delay);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks normal to me. :)

@tomaswitek
Copy link
Copy Markdown

👍

@xiaotian-tan
Copy link
Copy Markdown

Wondering when this could be merged to master?

@ranolf
Copy link
Copy Markdown

ranolf commented Sep 23, 2016

This would be a very useful feature. I'd rather be able to get it from NPM than having point at austburn:api-response-delay

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

Successfully merging this pull request may close these issues.

6 participants