fancy-test
fancy-test copied to clipboard
stdin not closed after sending input
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.