Skip to content

Commit e14f864

Browse files
Trottaddaleax
authored andcommitted
lib,test: remove lib/internal/test/unicode.js
Remove lib/internal/test/unicode.js and associated test. When we added the file and test, only comments in lib had non-ASCII characters. Now, lib/internal/cli_table.js has non-ASCII characters. Tests that exercise the `console.table()` therefore fulfill the need to test non-ASCII characters in built-in modules. PR-URL: #25298 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 9101591 commit e14f864

File tree

4 files changed

+6
-21
lines changed

4 files changed

+6
-21
lines changed

lib/internal/cli_table.js

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ const { Buffer } = require('buffer');
44
const { removeColors } = require('internal/util');
55
const HasOwnProperty = Function.call.bind(Object.prototype.hasOwnProperty);
66

7+
// The use of Unicode characters below is the only non-comment use of non-ASCII
8+
// Unicode characters in Node.js built-in modules. If they are ever removed or
9+
// rewritten with \u escapes, then a test will need to be (re-)added to Node.js
10+
// core to verify that Unicode characters work in built-ins. Otherwise,
11+
// consumers using Unicode in _third_party_main.js will run into problems.
12+
// Refs: https://github.com/nodejs/node/issues/10673
713
const tableChars = {
814
/* eslint-disable node-core/non-ascii-character */
915
middleMiddle: '─',

lib/internal/test/unicode.js

-8
This file was deleted.

node.gyp

-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@
159159
'lib/internal/socket_list.js',
160160
'lib/internal/test/binding.js',
161161
'lib/internal/test/heap.js',
162-
'lib/internal/test/unicode.js',
163162
'lib/internal/timers.js',
164163
'lib/internal/tls.js',
165164
'lib/internal/trace_events_async_hooks.js',

test/parallel/test-internal-unicode.js

-12
This file was deleted.

0 commit comments

Comments
 (0)