Skip to content

Commit 81cf2b4

Browse files
TrottMylesBorins
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 <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 554a434 commit 81cf2b4

File tree

4 files changed

+6
-21
lines changed

4 files changed

+6
-21
lines changed

Diff for: 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: '─',

Diff for: lib/internal/test/unicode.js

-8
This file was deleted.

Diff for: node.gyp

-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@
154154
'lib/internal/socket_list.js',
155155
'lib/internal/test/binding.js',
156156
'lib/internal/test/heap.js',
157-
'lib/internal/test/unicode.js',
158157
'lib/internal/timers.js',
159158
'lib/internal/tls.js',
160159
'lib/internal/trace_events_async_hooks.js',

Diff for: test/parallel/test-internal-unicode.js

-12
This file was deleted.

0 commit comments

Comments
 (0)