Browse Source

test: add test for process.stdin.setRawMode()

adds a basic test for process.stdin.setRawMode to ensure that the isRaw
property is properly changed

PR-URL: https://github.com/nodejs/node/pull/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>
v6.x
Jonathan Darling 8 years ago
committed by Anna Henningsen
parent
commit
ec7df6c0a4
No known key found for this signature in database GPG Key ID: D8B9F5AEAE84E4CF
  1. 9
      test/pseudo-tty/stdin-setrawmode.js

9
test/pseudo-tty/stdin-setrawmode.js

@ -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);
Loading…
Cancel
Save