GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: backward compatible api for tty · nodejs/node@d82ae0c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-tty-backwards-api.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-tty-backwards-api.js‎

Copy file name to clipboard
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.