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

Add a method to "restart" a mock stdin without re-creating the mock #2

Closed
caitp opened this issue Oct 12, 2014 · 0 comments
Closed

Comments

@caitp
Copy link
Owner

caitp commented Oct 12, 2014

Basically need a way to prevent Readable#push() from throwing after stdin.end() has been called, just a nice way to make tests a bit cleaner.

caitp added a commit that referenced this issue Oct 12, 2014
Ordinarily, a Readable stream will throw when attempting to push after an EOF. This routine will
reset the `ended` state of a Readable stream, preventing it from throwing post-EOF. This prevents
being required to re-create a mock STDIN instance during certain tests where a fresh stdin is
required.

Closes #2
@caitp caitp closed this as completed in 55e51a5 Oct 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant