@@ -1306,11 +1306,11 @@ if (typeof Symbol !== 'undefined') {
1306
1306
{
1307
1307
const x = new Uint8Array ( 101 ) ;
1308
1308
assert ( util . inspect ( x ) . endsWith ( '1 more item\n]' ) ) ;
1309
- assert ( ! util . inspect ( x , { maxArrayLength : 101 } ) . endsWith ( '1 more item\n] ' ) ) ;
1309
+ assert ( ! util . inspect ( x , { maxArrayLength : 101 } ) . includes ( '1 more item' ) ) ;
1310
1310
assert . strictEqual ( util . inspect ( x , { maxArrayLength : 0 } ) ,
1311
1311
'Uint8Array [ ... 101 more items ]' ) ;
1312
- assert ( ! util . inspect ( x , { maxArrayLength : null } ) . endsWith ( '1 more item\n] ' ) ) ;
1313
- assert ( util . inspect ( x , { maxArrayLength : Infinity } ) . endsWith ( ' 0, 0\n]' ) ) ;
1312
+ assert ( ! util . inspect ( x , { maxArrayLength : null } ) . includes ( '1 more item' ) ) ;
1313
+ assert ( util . inspect ( x , { maxArrayLength : Infinity } ) . endsWith ( ' 0, 0\n]' ) ) ;
1314
1314
}
1315
1315
1316
1316
{
@@ -1940,7 +1940,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
1940
1940
[ WeakMap , [ [ [ { } , { } ] ] ] , '{ <items unknown> }' ] ,
1941
1941
[ BigInt64Array ,
1942
1942
[ 10 ] ,
1943
- '[\n 0n, 0n, 0n,\n 0n, 0n, 0n, \n 0n, 0n, 0n,\n 0n\n]' ] ,
1943
+ '[\n 0n, 0n, 0n, 0n, 0n,\n 0n, 0n, 0n, 0n, 0n\n]' ] ,
1944
1944
[ Date , [ 'Sun, 14 Feb 2010 11:48:40 GMT' ] , '2010-02-14T11:48:40.000Z' ] ,
1945
1945
[ Date , [ 'invalid_date' ] , 'Invalid Date' ]
1946
1946
] . forEach ( ( [ base , input , rawExpected ] ) => {
@@ -2180,21 +2180,18 @@ assert.strictEqual(
2180
2180
' b: [ 1, 2, [ 1, 2, { a: 1, b: 2, c: 3 } ] ],' ,
2181
2181
" c: [ 'foo', 4, 444444 ]," ,
2182
2182
' d: [' ,
2183
- ' 0, 1, 4, 3, 16, 5, 36,' ,
2184
- ' 7, 64, 9, 100, 11, 144, 13,' ,
2185
- ' 196, 15, 256, 17, 324, 19, 400,' ,
2186
- ' 21, 484, 23, 576, 25, 676, 27,' ,
2187
- ' 784, 29, 900, 31, 1024, 33, 1156,' ,
2188
- ' 35, 1296, 37, 1444, 39, 1600, 41,' ,
2189
- ' 1764, 43, 1936, 45, 2116, 47, 2304,' ,
2190
- ' 49, 2500, 51, 2704, 53, 2916, 55,' ,
2191
- ' 3136, 57, 3364, 59, 3600, 61, 3844,' ,
2192
- ' 63, 4096, 65, 4356, 67, 4624, 69,' ,
2193
- ' 4900, 71, 5184, 73, 5476, 75, 5776,' ,
2194
- ' 77, 6084, 79, 6400, 81, 6724, 83,' ,
2195
- ' 7056, 85, 7396, 87, 7744, 89, 8100,' ,
2196
- ' 91, 8464, 93, 8836, 95, 9216, 97,' ,
2197
- ' 9604, 99,' ,
2183
+ ' 0, 1, 4, 3, 16, 5, 36, 7, 64,' ,
2184
+ ' 9, 100, 11, 144, 13, 196, 15, 256, 17,' ,
2185
+ ' 324, 19, 400, 21, 484, 23, 576, 25, 676,' ,
2186
+ ' 27, 784, 29, 900, 31, 1024, 33, 1156, 35,' ,
2187
+ ' 1296, 37, 1444, 39, 1600, 41, 1764, 43, 1936,' ,
2188
+ ' 45, 2116, 47, 2304, 49, 2500, 51, 2704, 53,' ,
2189
+ ' 2916, 55, 3136, 57, 3364, 59, 3600, 61, 3844,' ,
2190
+ ' 63, 4096, 65, 4356, 67, 4624, 69, 4900, 71,' ,
2191
+ ' 5184, 73, 5476, 75, 5776, 77, 6084, 79, 6400,' ,
2192
+ ' 81, 6724, 83, 7056, 85, 7396, 87, 7744, 89,' ,
2193
+ ' 8100, 91, 8464, 93, 8836, 95, 9216, 97, 9604,' ,
2194
+ ' 99,' ,
2198
2195
' ... 1 more item' ,
2199
2196
' ],' ,
2200
2197
' e: [' ,
@@ -2226,10 +2223,8 @@ assert.strictEqual(
2226
2223
" 'foobar baz'" ,
2227
2224
' ],' ,
2228
2225
' h: [' ,
2229
- ' 100, 0, 1,' ,
2230
- ' 2, 3, 4,' ,
2231
- ' 5, 6, 7,' ,
2232
- ' 8' ,
2226
+ ' 100, 0, 1, 2, 3,' ,
2227
+ ' 4, 5, 6, 7, 8' ,
2233
2228
' ],' ,
2234
2229
' long: [' ,
2235
2230
" 'This text is too long for grouping!'," ,
@@ -2257,15 +2252,15 @@ assert.strictEqual(
2257
2252
2258
2253
expected = [
2259
2254
'[' ,
2260
- ' 1, 1, 1,' ,
2261
- ' 1, 1, 1,' ,
2262
- ' 1, 1, 1,' ,
2263
- ' 1, 1, 1,' ,
2264
- ' 1, 1, 1,' ,
2265
- ' 1, 1, 1,' ,
2266
- ' 1, 1, 1,' ,
2267
- ' 1, 1, 1,' ,
2268
- ' 1, 1, 123456789' ,
2255
+ ' 1, 1, 1,' ,
2256
+ ' 1, 1, 1,' ,
2257
+ ' 1, 1, 1,' ,
2258
+ ' 1, 1, 1,' ,
2259
+ ' 1, 1, 1,' ,
2260
+ ' 1, 1, 1,' ,
2261
+ ' 1, 1, 1,' ,
2262
+ ' 1, 1, 1,' ,
2263
+ ' 1, 1, 123456789' ,
2269
2264
']'
2270
2265
] . join ( '\n' ) ;
2271
2266
@@ -2295,10 +2290,10 @@ assert.strictEqual(
2295
2290
' b: { x: \u001b[33m5\u001b[39m, c: \u001b[36m[Object]\u001b[39m }' ,
2296
2291
' },' ,
2297
2292
' b: [' ,
2298
- " \u001b[32m'foobar'\u001b[39m, \u001b[32m'baz'\u001b[39m," ,
2299
- " \u001b[32m'foobar'\u001b[39m, \u001b[32m'baz'\u001b[39m," ,
2300
- " \u001b[32m'foobar'\u001b[39m, \u001b[32m'baz'\u001b[39m," ,
2301
- " \u001b[32m'foobar'\u001b[39m, \u001b[32m'baz'\u001b[39m," ,
2293
+ " \u001b[32m'foobar'\u001b[39m, \u001b[32m'baz'\u001b[39m," ,
2294
+ " \u001b[32m'foobar'\u001b[39m, \u001b[32m'baz'\u001b[39m," ,
2295
+ " \u001b[32m'foobar'\u001b[39m, \u001b[32m'baz'\u001b[39m," ,
2296
+ " \u001b[32m'foobar'\u001b[39m, \u001b[32m'baz'\u001b[39m," ,
2302
2297
" \u001b[32m'foobar'\u001b[39m" ,
2303
2298
' ]' ,
2304
2299
'}' ,
@@ -2311,26 +2306,23 @@ assert.strictEqual(
2311
2306
2312
2307
expected = [
2313
2308
'[' ,
2314
- ' \u001b[33m0\u001b[39m, \u001b[33m1\u001b[39m, \u001b[33m2\u001b[39m,' ,
2315
- ' \u001b[33m3\u001b[39m, \u001b[33m4\u001b[39m, \u001b[33m5\u001b[39m,' ,
2316
- ' \u001b[33m6\u001b[39m, \u001b[33m7\u001b[39m, \u001b[33m8\u001b[39m,' ,
2317
- ' \u001b[33m9\u001b[39m, \u001b[33m10\u001b[39m, \u001b[33m11\u001b[39m,' ,
2318
- ' \u001b[33m12\u001b[39m, \u001b[33m13\u001b[39m, \u001b[33m14\u001b[39m,' ,
2319
- ' \u001b[33m15\u001b[39m, \u001b[33m16\u001b[39m, \u001b[33m17\u001b[39m,' ,
2320
- ' \u001b[33m18\u001b[39m, \u001b[33m19\u001b[39m, \u001b[33m20\u001b[39m,' ,
2321
- ' \u001b[33m21\u001b[39m, \u001b[33m22\u001b[39m, \u001b[33m23\u001b[39m,' ,
2322
- ' \u001b[33m24\u001b[39m, \u001b[33m25\u001b[39m, \u001b[33m26\u001b[39m,' ,
2323
- ' \u001b[33m27\u001b[39m, \u001b[33m28\u001b[39m, \u001b[33m29\u001b[39m,' ,
2324
- ' \u001b[33m30\u001b[39m, \u001b[33m31\u001b[39m, \u001b[33m32\u001b[39m,' ,
2325
- ' \u001b[33m33\u001b[39m, \u001b[33m34\u001b[39m, \u001b[33m35\u001b[39m,' ,
2326
- ' \u001b[33m36\u001b[39m, \u001b[33m37\u001b[39m, \u001b[33m38\u001b[39m,' ,
2327
- ' \u001b[33m39\u001b[39m, \u001b[33m40\u001b[39m, \u001b[33m41\u001b[39m,' ,
2328
- ' \u001b[33m42\u001b[39m, \u001b[33m43\u001b[39m, \u001b[33m44\u001b[39m,' ,
2329
- ' \u001b[33m45\u001b[39m, \u001b[33m46\u001b[39m, \u001b[33m47\u001b[39m,' ,
2330
- ' \u001b[33m48\u001b[39m, \u001b[33m49\u001b[39m, \u001b[33m50\u001b[39m,' ,
2331
- ' \u001b[33m51\u001b[39m, \u001b[33m52\u001b[39m, \u001b[33m53\u001b[39m,' ,
2332
- ' \u001b[33m54\u001b[39m, \u001b[33m55\u001b[39m, \u001b[33m56\u001b[39m,' ,
2333
- ' \u001b[33m57\u001b[39m, \u001b[33m58\u001b[39m, \u001b[33m59\u001b[39m' ,
2309
+ /* eslint-disable max-len */
2310
+ ' \u001b[33m0\u001b[39m, \u001b[33m1\u001b[39m, \u001b[33m2\u001b[39m, \u001b[33m3\u001b[39m,' ,
2311
+ ' \u001b[33m4\u001b[39m, \u001b[33m5\u001b[39m, \u001b[33m6\u001b[39m, \u001b[33m7\u001b[39m,' ,
2312
+ ' \u001b[33m8\u001b[39m, \u001b[33m9\u001b[39m, \u001b[33m10\u001b[39m, \u001b[33m11\u001b[39m,' ,
2313
+ ' \u001b[33m12\u001b[39m, \u001b[33m13\u001b[39m, \u001b[33m14\u001b[39m, \u001b[33m15\u001b[39m,' ,
2314
+ ' \u001b[33m16\u001b[39m, \u001b[33m17\u001b[39m, \u001b[33m18\u001b[39m, \u001b[33m19\u001b[39m,' ,
2315
+ ' \u001b[33m20\u001b[39m, \u001b[33m21\u001b[39m, \u001b[33m22\u001b[39m, \u001b[33m23\u001b[39m,' ,
2316
+ ' \u001b[33m24\u001b[39m, \u001b[33m25\u001b[39m, \u001b[33m26\u001b[39m, \u001b[33m27\u001b[39m,' ,
2317
+ ' \u001b[33m28\u001b[39m, \u001b[33m29\u001b[39m, \u001b[33m30\u001b[39m, \u001b[33m31\u001b[39m,' ,
2318
+ ' \u001b[33m32\u001b[39m, \u001b[33m33\u001b[39m, \u001b[33m34\u001b[39m, \u001b[33m35\u001b[39m,' ,
2319
+ ' \u001b[33m36\u001b[39m, \u001b[33m37\u001b[39m, \u001b[33m38\u001b[39m, \u001b[33m39\u001b[39m,' ,
2320
+ ' \u001b[33m40\u001b[39m, \u001b[33m41\u001b[39m, \u001b[33m42\u001b[39m, \u001b[33m43\u001b[39m,' ,
2321
+ ' \u001b[33m44\u001b[39m, \u001b[33m45\u001b[39m, \u001b[33m46\u001b[39m, \u001b[33m47\u001b[39m,' ,
2322
+ ' \u001b[33m48\u001b[39m, \u001b[33m49\u001b[39m, \u001b[33m50\u001b[39m, \u001b[33m51\u001b[39m,' ,
2323
+ ' \u001b[33m52\u001b[39m, \u001b[33m53\u001b[39m, \u001b[33m54\u001b[39m, \u001b[33m55\u001b[39m,' ,
2324
+ ' \u001b[33m56\u001b[39m, \u001b[33m57\u001b[39m, \u001b[33m58\u001b[39m, \u001b[33m59\u001b[39m' ,
2325
+ /* eslint-enable max-len */
2334
2326
']'
2335
2327
] . join ( '\n' ) ;
2336
2328
@@ -2389,44 +2381,44 @@ assert.strictEqual(
2389
2381
) ;
2390
2382
expected = [
2391
2383
'[' ,
2392
- " 'Object', 'Function', 'Array'," ,
2393
- " 'Number', 'parseFloat', 'parseInt'," ,
2394
- " 'Infinity', 'NaN', 'undefined'," ,
2395
- " 'Boolean', 'String', 'Symbol'," ,
2396
- " 'Date', 'Promise', 'RegExp'," ,
2397
- " 'Error', 'EvalError', 'RangeError'," ,
2398
- " 'ReferenceError', 'SyntaxError', 'TypeError'," ,
2399
- " 'URIError', 'JSON', 'Math'," ,
2400
- " 'console', 'Intl', 'ArrayBuffer'," ,
2401
- " 'Uint8Array', 'Int8Array', 'Uint16Array'," ,
2402
- " 'Int16Array', 'Uint32Array', 'Int32Array'," ,
2403
- " 'Float32Array', 'Float64Array', 'Uint8ClampedArray'," ,
2404
- " 'BigUint64Array', 'BigInt64Array', 'DataView'," ,
2405
- " 'Map', 'BigInt', 'Set'," ,
2406
- " 'WeakMap', 'WeakSet', 'Proxy'," ,
2407
- " 'Reflect ', 'decodeURI', 'decodeURIComponent'," ,
2408
- " 'encodeURI', 'encodeURIComponent', 'escape'," ,
2409
- " 'unescape', 'eval', 'isFinite'," ,
2410
- " 'isNaN', 'SharedArrayBuffer', 'Atomics'," ,
2411
- " 'globalThis', 'WebAssembly', 'global'," ,
2412
- " 'process', 'GLOBAL', 'root'," ,
2413
- " 'Buffer ', 'URL', 'URLSearchParams'," ,
2414
- " 'TextEncoder', 'TextDecoder', 'clearInterval'," ,
2415
- " 'clearTimeout', 'setInterval', 'setTimeout'," ,
2416
- " 'queueMicrotask', 'clearImmediate', 'setImmediate'," ,
2417
- " 'module', 'require', 'assert'," ,
2418
- " 'async_hooks', 'buffer', 'child_process'," ,
2419
- " 'cluster', 'crypto', 'dgram'," ,
2420
- " 'dns', 'domain', 'events'," ,
2421
- " 'fs', 'http', 'http2'," ,
2422
- " 'https', 'inspector', 'net'," ,
2423
- " 'os', 'path', 'perf_hooks'," ,
2424
- " 'punycode', 'querystring', 'readline'," ,
2425
- " 'repl ', 'stream', 'string_decoder'," ,
2426
- " 'tls', 'trace_events', 'tty'," ,
2427
- " 'url', 'v8', 'vm'," ,
2428
- " 'worker_threads', 'zlib', '_'," ,
2429
- " '_error', 'util'" ,
2384
+ " 'Object', 'Function', 'Array'," ,
2385
+ " 'Number', 'parseFloat', 'parseInt'," ,
2386
+ " 'Infinity', 'NaN', 'undefined'," ,
2387
+ " 'Boolean', 'String', 'Symbol'," ,
2388
+ " 'Date', 'Promise', 'RegExp'," ,
2389
+ " 'Error', 'EvalError', 'RangeError'," ,
2390
+ " 'ReferenceError', 'SyntaxError', 'TypeError'," ,
2391
+ " 'URIError', 'JSON', 'Math'," ,
2392
+ " 'console', 'Intl', 'ArrayBuffer'," ,
2393
+ " 'Uint8Array', 'Int8Array', 'Uint16Array'," ,
2394
+ " 'Int16Array', 'Uint32Array', 'Int32Array'," ,
2395
+ " 'Float32Array', 'Float64Array', 'Uint8ClampedArray'," ,
2396
+ " 'BigUint64Array', 'BigInt64Array', 'DataView'," ,
2397
+ " 'Map', 'BigInt', 'Set'," ,
2398
+ " 'WeakMap', 'WeakSet', 'Proxy'," ,
2399
+ " 'Reflect', 'decodeURI ', 'decodeURIComponent'," ,
2400
+ " 'encodeURI', 'encodeURIComponent', 'escape'," ,
2401
+ " 'unescape', 'eval', 'isFinite'," ,
2402
+ " 'isNaN', 'SharedArrayBuffer', 'Atomics'," ,
2403
+ " 'globalThis', 'WebAssembly', 'global'," ,
2404
+ " 'process', 'GLOBAL', 'root'," ,
2405
+ " 'Buffer', 'URL ', 'URLSearchParams'," ,
2406
+ " 'TextEncoder', 'TextDecoder', 'clearInterval'," ,
2407
+ " 'clearTimeout', 'setInterval', 'setTimeout'," ,
2408
+ " 'queueMicrotask', 'clearImmediate', 'setImmediate'," ,
2409
+ " 'module', 'require', 'assert'," ,
2410
+ " 'async_hooks', 'buffer', 'child_process'," ,
2411
+ " 'cluster', 'crypto', 'dgram'," ,
2412
+ " 'dns', 'domain', 'events'," ,
2413
+ " 'fs', 'http', 'http2'," ,
2414
+ " 'https', 'inspector', 'net'," ,
2415
+ " 'os', 'path', 'perf_hooks'," ,
2416
+ " 'punycode', 'querystring', 'readline'," ,
2417
+ " 'repl', 'stream ', 'string_decoder'," ,
2418
+ " 'tls', 'trace_events', 'tty'," ,
2419
+ " 'url', 'v8', 'vm'," ,
2420
+ " 'worker_threads', 'zlib', '_'," ,
2421
+ " '_error', 'util'" ,
2430
2422
']'
2431
2423
] . join ( '\n' ) ;
2432
2424
0 commit comments