Skip to content

Commit

Permalink
test: add test for process.stdin.setRawMode()
Browse files Browse the repository at this point in the history
adds a basic test for process.stdin.setRawMode to ensure that the isRaw
property is properly changed

PR-URL: #10037
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Jonathan Darling authored and jasnell committed Dec 5, 2016
1 parent 1d766b8 commit 3ae0900
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/pseudo-tty/stdin-setrawmode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';
require('../common');
const assert = require('assert');

process.stdin.setRawMode(true);
assert.strictEqual(process.stdin.isRaw, true);

process.stdin.setRawMode(false);
assert.strictEqual(process.stdin.isRaw, false);

0 comments on commit 3ae0900

Please sign in to comment.