@@ -2233,4 +2233,94 @@ assert.strictEqual(
22332233 '\u001b[33m3\u001b[39m, \u001b[33m4\u001b[39m ]' ;
22342234
22352235 assert . strictEqual ( out , expected ) ;
2236+
2237+ obj = [
2238+ 'Object' , 'Function' , 'Array' ,
2239+ 'Number' , 'parseFloat' , 'parseInt' ,
2240+ 'Infinity' , 'NaN' , 'undefined' ,
2241+ 'Boolean' , 'String' , 'Symbol' ,
2242+ 'Date' , 'Promise' , 'RegExp' ,
2243+ 'Error' , 'EvalError' , 'RangeError' ,
2244+ 'ReferenceError' , 'SyntaxError' , 'TypeError' ,
2245+ 'URIError' , 'JSON' , 'Math' ,
2246+ 'console' , 'Intl' , 'ArrayBuffer' ,
2247+ 'Uint8Array' , 'Int8Array' , 'Uint16Array' ,
2248+ 'Int16Array' , 'Uint32Array' , 'Int32Array' ,
2249+ 'Float32Array' , 'Float64Array' , 'Uint8ClampedArray' ,
2250+ 'BigUint64Array' , 'BigInt64Array' , 'DataView' ,
2251+ 'Map' , 'BigInt' , 'Set' ,
2252+ 'WeakMap' , 'WeakSet' , 'Proxy' ,
2253+ 'Reflect' , 'decodeURI' , 'decodeURIComponent' ,
2254+ 'encodeURI' , 'encodeURIComponent' , 'escape' ,
2255+ 'unescape' , 'eval' , 'isFinite' ,
2256+ 'isNaN' , 'SharedArrayBuffer' , 'Atomics' ,
2257+ 'globalThis' , 'WebAssembly' , 'global' ,
2258+ 'process' , 'GLOBAL' , 'root' ,
2259+ 'Buffer' , 'URL' , 'URLSearchParams' ,
2260+ 'TextEncoder' , 'TextDecoder' , 'clearInterval' ,
2261+ 'clearTimeout' , 'setInterval' , 'setTimeout' ,
2262+ 'queueMicrotask' , 'clearImmediate' , 'setImmediate' ,
2263+ 'module' , 'require' , 'assert' ,
2264+ 'async_hooks' , 'buffer' , 'child_process' ,
2265+ 'cluster' , 'crypto' , 'dgram' ,
2266+ 'dns' , 'domain' , 'events' ,
2267+ 'fs' , 'http' , 'http2' ,
2268+ 'https' , 'inspector' , 'net' ,
2269+ 'os' , 'path' , 'perf_hooks' ,
2270+ 'punycode' , 'querystring' , 'readline' ,
2271+ 'repl' , 'stream' , 'string_decoder' ,
2272+ 'tls' , 'trace_events' , 'tty' ,
2273+ 'url' , 'v8' , 'vm' ,
2274+ 'worker_threads' , 'zlib' , '_' ,
2275+ '_error' , 'util'
2276+ ] ;
2277+
2278+ out = util . inspect (
2279+ obj ,
2280+ { compact : 3 , breakLength : 80 , maxArrayLength : 250 }
2281+ ) ;
2282+ expected = [
2283+ '[' ,
2284+ " 'Object', 'Function', 'Array'," ,
2285+ " 'Number', 'parseFloat', 'parseInt'," ,
2286+ " 'Infinity', 'NaN', 'undefined'," ,
2287+ " 'Boolean', 'String', 'Symbol'," ,
2288+ " 'Date', 'Promise', 'RegExp'," ,
2289+ " 'Error', 'EvalError', 'RangeError'," ,
2290+ " 'ReferenceError', 'SyntaxError', 'TypeError'," ,
2291+ " 'URIError', 'JSON', 'Math'," ,
2292+ " 'console', 'Intl', 'ArrayBuffer'," ,
2293+ " 'Uint8Array', 'Int8Array', 'Uint16Array'," ,
2294+ " 'Int16Array', 'Uint32Array', 'Int32Array'," ,
2295+ " 'Float32Array', 'Float64Array', 'Uint8ClampedArray'," ,
2296+ " 'BigUint64Array', 'BigInt64Array', 'DataView'," ,
2297+ " 'Map', 'BigInt', 'Set'," ,
2298+ " 'WeakMap', 'WeakSet', 'Proxy'," ,
2299+ " 'Reflect', 'decodeURI', 'decodeURIComponent'," ,
2300+ " 'encodeURI', 'encodeURIComponent', 'escape'," ,
2301+ " 'unescape', 'eval', 'isFinite'," ,
2302+ " 'isNaN', 'SharedArrayBuffer', 'Atomics'," ,
2303+ " 'globalThis', 'WebAssembly', 'global'," ,
2304+ " 'process', 'GLOBAL', 'root'," ,
2305+ " 'Buffer', 'URL', 'URLSearchParams'," ,
2306+ " 'TextEncoder', 'TextDecoder', 'clearInterval'," ,
2307+ " 'clearTimeout', 'setInterval', 'setTimeout'," ,
2308+ " 'queueMicrotask', 'clearImmediate', 'setImmediate'," ,
2309+ " 'module', 'require', 'assert'," ,
2310+ " 'async_hooks', 'buffer', 'child_process'," ,
2311+ " 'cluster', 'crypto', 'dgram'," ,
2312+ " 'dns', 'domain', 'events'," ,
2313+ " 'fs', 'http', 'http2'," ,
2314+ " 'https', 'inspector', 'net'," ,
2315+ " 'os', 'path', 'perf_hooks'," ,
2316+ " 'punycode', 'querystring', 'readline'," ,
2317+ " 'repl', 'stream', 'string_decoder'," ,
2318+ " 'tls', 'trace_events', 'tty'," ,
2319+ " 'url', 'v8', 'vm'," ,
2320+ " 'worker_threads', 'zlib', '_'," ,
2321+ " '_error', 'util'" ,
2322+ ']'
2323+ ] . join ( '\n' ) ;
2324+
2325+ assert . strictEqual ( out , expected ) ;
22362326}
0 commit comments