This repository has been archived by the owner. It is now read-only.
Please sign in to comment.
test: remove invalid part of stream2-stderr-sync
One test case in test-stream2-stderr-sync.js was creating a TTY object using an undocumented constructor and passing in fd 2. However, this is running in a child process and fd 2 is actually a pipe, not a TTY. The constructor fails on Windows and causes the handle type to be left uninitialized, which later causes an assert to fail. On Unix, the constructor fails to retrieve the windows size but unlike on Windows, it just leaves the size fields undefined and continues with initializing the stream type, yielding a semi-usable object. I could make the Windows version match Unix behavior, but it seems to me that the test is relying on an implementation detail of an undocumented API, and the Unix behavior is not necessarily more correct than the Windows one. Thus it makes more sense to remove this test.
- Loading branch information...
Showing with 11 additions and 51 deletions.