We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a792ea7 commit d82ae0cCopy full SHA for d82ae0c
test/parallel/test-tty-backwards-api.js
@@ -0,0 +1,25 @@
1
+'use strict';
2
+const common = require('../common');
3
+
4
+const noop = () => {};
5
+const TTY = process.binding('tty_wrap').TTY = function() {};
6
7
+TTY.prototype = {
8
+ setBlocking: noop,
9
+ getWindowSize: noop
10
+};
11
12
+const { WriteStream } = require('tty');
13
14
+const methods = [
15
+ 'cursorTo',
16
+ 'moveCursor',
17
+ 'clearLine',
18
+ 'clearScreenDown'
19
+];
20
21
+methods.forEach((method) => {
22
+ require('readline')[method] = common.mustCall();
23
+ const writeStream = new WriteStream(1);
24
+ writeStream[method](1, 2);
25
+});
0 commit comments