Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

stdin not closed after sending input #25

Open
tchaumeny opened this issue May 13, 2019 · 0 comments
Open

stdin not closed after sending input #25

tchaumeny opened this issue May 13, 2019 · 0 comments

Comments

@tchaumeny
Copy link

In the current implementation, mock-stdin is not ended after passing it the input (see https://github.com/caitp/node-mock-stdin/blob/master/lib/mock/stdin.js#L132 for the end method).

This causes test reading from stdin to hang forever.

Since we have no access to the underlying mock-stdin instance, we cannot do it ourself.

Calling stdin.end() in https://github.com/jdxcode/fancy-test/blob/d89fed06192386a91cdae088a282236c06291dd5/src/stdmock.ts#L25 seems to solve this issue.

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

No branches or pull requests

1 participant