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 <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Jonathan Darling authored and Fishrock123 committed Dec 6, 2016
1 parent 990a19f commit 256de35
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 256de35

Please sign in to comment.