summaryrefslogtreecommitdiff
path: root/test/pseudo-tty/test-tty-wrap.js
blob: 917f04869ab5fe3fb8e0206a157b4bd98550279f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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'));