You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
486 B

'use strict';
const common = require('../common');
const noop = () => {};
const TTY = process.binding('tty_wrap').TTY = function() {};
TTY.prototype = {
setBlocking: noop,
getWindowSize: noop
};
const { WriteStream } = require('tty');
const methods = [
'cursorTo',
'moveCursor',
'clearLine',
'clearScreenDown'
];
methods.forEach((method) => {
require('readline')[method] = common.mustCall();
const writeStream = new WriteStream(1);
writeStream[method](1, 2);
});