Skip to content

Commit 26478c3

Browse files
committed
use fd[1] only on Windows
1 parent 099db9e commit 26478c3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/async-hooks/test-ttywrap.readstream.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ const checkEndedOpts = { init: 1, before: 1, after: 1, destroy: 1 };
1717

1818
// test code
1919
//
20-
// listen to stdout that should be non-blocking even on windows
21-
const ttyStream = new ReadStream(1);
20+
// listen to stdin except on Windows
21+
const targetFD = common.isWindows ? 1 : 0;
22+
const ttyStream = new ReadStream(targetFD);
2223
const activities = hooks.activitiesOfTypes('TTYWRAP');
2324
assert.strictEqual(activities.length, 1);
2425
const tty = activities[0];

0 commit comments

Comments
 (0)