Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(MockSTDIN): add reset() method to allow pushing data post-EOF
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
- Loading branch information
Showing
3 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters