0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
nodejs/test/pseudo-tty/test-tty-wrap.js
cjihrig df073cdda4
tty: make process.binding('tty_wrap') internal
PR-URL: https://github.com/nodejs/node/pull/22477
Refs: https://github.com/nodejs/node/issues/22160
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2018-08-29 12:28:51 -04:00

14 lines
413 B
JavaScript

// Flags: --expose-internals --no-warnings
'use strict';
require('../common');
const { internalBinding } = require('internal/test/binding');
const { TTY } = internalBinding('tty_wrap');
const { WriteWrap } = internalBinding('stream_wrap');
const handle = new TTY(1);
const req = new WriteWrap();
handle.writeBuffer(req, Buffer.from('hello world 1\n'));
handle.writeBuffer(req, Buffer.from('hello world 2\n'));