browser_webconsole_object_inspector_entries.snapshot.mjs (24411B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 /* 5 * THIS FILE IS AUTOGENERATED. DO NOT MODIFY BY HAND. 6 * 7 * More info in https://firefox-source-docs.mozilla.org/devtools/tests/js-object-tests.html 8 */ 9 10 export default [ 11 // undefined 12 "undefined", 13 14 // null 15 "null", 16 17 // true 18 "true", 19 20 // false 21 "false", 22 23 // NaN 24 "NaN", 25 26 // "abc" 27 "abc", 28 29 // "鼬ú" 30 "鼬ú", 31 32 // 42 33 "42", 34 35 // -42 36 "-42", 37 38 // -0 39 "-0", 40 41 // Infinity 42 "Infinity", 43 44 // BigInt(1000000000000000000) 45 "1000000000000000000n", 46 47 // 1n 48 "1n", 49 50 // -2n 51 "-2n", 52 53 // 0n 54 "0n", 55 56 // ({}) 57 [ 58 "▼ Object { }", 59 " ▶︎ <prototype>: Object { … }" 60 ], 61 62 // ({ foo: "bar"}) 63 [ 64 "▼ Object { foo: \"bar\" }", 65 " ├ foo: \"bar\"", 66 " ▶︎ <prototype>: Object { … }" 67 ], 68 69 // [] 70 [ 71 "▼ Array []", 72 " ├ length: 0", 73 " ▶︎ <prototype>: Array []" 74 ], 75 76 // [1] 77 [ 78 "▼ Array [ 1 ]", 79 " ├ 0: 1", 80 " ├ length: 1", 81 " ▶︎ <prototype>: Array []" 82 ], 83 84 // ["foo"] 85 [ 86 "▼ Array [ \"foo\" ]", 87 " ├ 0: \"foo\"", 88 " ├ length: 1", 89 " ▶︎ <prototype>: Array []" 90 ], 91 92 // new BigInt64Array() 93 [ 94 "▼ BigInt64Array []", 95 " ▶︎ buffer: ArrayBuffer { byteLength: 0 }", 96 " ├ byteLength: 0", 97 " ├ byteOffset: 0", 98 " ├ length: 0", 99 " ▶︎ <prototype>: BigInt64Array.prototype { … }" 100 ], 101 102 // const a = new BigInt64Array(1); 103 // a[0] = BigInt(42); 104 // a; 105 // 106 [ 107 "▼ BigInt64Array [ 42n ]", 108 " ├ 0: 42n", 109 " ▶︎ buffer: ArrayBuffer { byteLength: 8 }", 110 " ├ byteLength: 8", 111 " ├ byteOffset: 0", 112 " ├ length: 1", 113 " ▶︎ <prototype>: BigInt64Array.prototype { … }" 114 ], 115 116 // new Map( 117 // Array.from({ length: 2 }).map((el, i) => [ 118 // { key: i }, 119 // { object: 42 }, 120 // ]) 121 // ) 122 [ 123 "▼ Map { {…} → {…}, {…} → {…} }", 124 " ├ size: 2", 125 " ▼ <entries>", 126 " ▼ 0: Object { key: 0 } → Object { object: 42 }", 127 " ▶︎ <key>: Object { key: 0 }", 128 " ▶︎ <value>: Object { object: 42 }", 129 " ▶︎ 1: Object { key: 1 } → Object { object: 42 }", 130 " ▶︎ <prototype>: Map.prototype { … }" 131 ], 132 133 // new Map(Array.from({ length: 20 }).map((el, i) => [Symbol(i), i])) 134 [ 135 "▼ Map(20) { Symbol(\"0\") → 0, Symbol(\"1\") → 1, Symbol(\"2\") → 2, Symbol(\"3\") → 3, Symbol(\"4\") → 4, Symbol(\"5\") → 5, Symbol(\"6\") → 6, Symbol(\"7\") → 7, Symbol(\"8\") → 8, Symbol(\"9\") → 9, … }", 136 " ├ size: 20", 137 " ▼ <entries>", 138 " ▼ 0: Symbol(\"0\") → 0", 139 " ├ <key>: Symbol(\"0\")", 140 " ├ <value>: 0", 141 " ▶︎ 1: Symbol(\"1\") → 1", 142 " ▶︎ 2: Symbol(\"2\") → 2", 143 " ▶︎ 3: Symbol(\"3\") → 3", 144 " ▶︎ 4: Symbol(\"4\") → 4", 145 " ▶︎ 5: Symbol(\"5\") → 5", 146 " ▶︎ 6: Symbol(\"6\") → 6", 147 " ▶︎ 7: Symbol(\"7\") → 7", 148 " ▶︎ 8: Symbol(\"8\") → 8", 149 " ▶︎ 9: Symbol(\"9\") → 9", 150 " ▶︎ 10: Symbol(\"10\") → 10", 151 " ▶︎ 11: Symbol(\"11\") → 11", 152 " ▶︎ 12: Symbol(\"12\") → 12", 153 " ▶︎ 13: Symbol(\"13\") → 13", 154 " ▶︎ 14: Symbol(\"14\") → 14", 155 " ▶︎ 15: Symbol(\"15\") → 15", 156 " ▶︎ 16: Symbol(\"16\") → 16", 157 " ▶︎ 17: Symbol(\"17\") → 17", 158 " ▶︎ 18: Symbol(\"18\") → 18", 159 " ▶︎ 19: Symbol(\"19\") → 19", 160 " ▶︎ <prototype>: Map.prototype { … }" 161 ], 162 163 // new Map(Array.from({ length: 331 }).map((el, i) => [Symbol(i), i])) 164 [ 165 "▼ Map(331) { Symbol(\"0\") → 0, Symbol(\"1\") → 1, Symbol(\"2\") → 2, Symbol(\"3\") → 3, Symbol(\"4\") → 4, Symbol(\"5\") → 5, Symbol(\"6\") → 6, Symbol(\"7\") → 7, Symbol(\"8\") → 8, Symbol(\"9\") → 9, … }", 166 " ├ size: 331", 167 " ▼ <entries>", 168 " ▼ [0…99]", 169 " ▶︎ 0: Symbol(\"0\") → 0", 170 " ▶︎ 1: Symbol(\"1\") → 1", 171 " ▶︎ 2: Symbol(\"2\") → 2", 172 " ▶︎ 3: Symbol(\"3\") → 3", 173 " ▶︎ 4: Symbol(\"4\") → 4", 174 " ▶︎ 5: Symbol(\"5\") → 5", 175 " ▶︎ 6: Symbol(\"6\") → 6", 176 " ▶︎ 7: Symbol(\"7\") → 7", 177 " ▶︎ 8: Symbol(\"8\") → 8", 178 " ▶︎ 9: Symbol(\"9\") → 9", 179 " ▶︎ 10: Symbol(\"10\") → 10", 180 " ▶︎ 11: Symbol(\"11\") → 11", 181 " ▶︎ 12: Symbol(\"12\") → 12", 182 " ▶︎ 13: Symbol(\"13\") → 13", 183 " ▶︎ 14: Symbol(\"14\") → 14", 184 " ▶︎ 15: Symbol(\"15\") → 15", 185 " ▶︎ 16: Symbol(\"16\") → 16", 186 " ▶︎ 17: Symbol(\"17\") → 17", 187 " ▶︎ 18: Symbol(\"18\") → 18", 188 " ▶︎ 19: Symbol(\"19\") → 19", 189 " ▶︎ 20: Symbol(\"20\") → 20", 190 " ▶︎ 21: Symbol(\"21\") → 21", 191 " ▶︎ 22: Symbol(\"22\") → 22", 192 " ▶︎ 23: Symbol(\"23\") → 23", 193 " ▶︎ 24: Symbol(\"24\") → 24", 194 " ▶︎ 25: Symbol(\"25\") → 25", 195 " ▶︎ 26: Symbol(\"26\") → 26", 196 " ▶︎ 27: Symbol(\"27\") → 27", 197 " ▶︎ 28: Symbol(\"28\") → 28", 198 " ▶︎ 29: Symbol(\"29\") → 29", 199 " ▶︎ 30: Symbol(\"30\") → 30", 200 " ▶︎ 31: Symbol(\"31\") → 31", 201 " ▶︎ 32: Symbol(\"32\") → 32", 202 " ▶︎ 33: Symbol(\"33\") → 33", 203 " ▶︎ 34: Symbol(\"34\") → 34", 204 " ▶︎ 35: Symbol(\"35\") → 35", 205 " ▶︎ 36: Symbol(\"36\") → 36", 206 " ▶︎ 37: Symbol(\"37\") → 37", 207 " ▶︎ 38: Symbol(\"38\") → 38", 208 " ▶︎ 39: Symbol(\"39\") → 39", 209 " ▶︎ 40: Symbol(\"40\") → 40", 210 " ▶︎ 41: Symbol(\"41\") → 41", 211 " ▶︎ 42: Symbol(\"42\") → 42", 212 " ▶︎ 43: Symbol(\"43\") → 43", 213 " ▶︎ 44: Symbol(\"44\") → 44", 214 " ▶︎ 45: Symbol(\"45\") → 45", 215 " ▶︎ 46: Symbol(\"46\") → 46", 216 " ▶︎ 47: Symbol(\"47\") → 47", 217 " ▶︎ 48: Symbol(\"48\") → 48", 218 " ▶︎ 49: Symbol(\"49\") → 49", 219 " ▶︎ 50: Symbol(\"50\") → 50", 220 " ▶︎ 51: Symbol(\"51\") → 51", 221 " ▶︎ 52: Symbol(\"52\") → 52", 222 " ▶︎ 53: Symbol(\"53\") → 53", 223 " ▶︎ 54: Symbol(\"54\") → 54", 224 " ▶︎ 55: Symbol(\"55\") → 55", 225 " ▶︎ 56: Symbol(\"56\") → 56", 226 " ▶︎ 57: Symbol(\"57\") → 57", 227 " ▶︎ 58: Symbol(\"58\") → 58", 228 " ▶︎ 59: Symbol(\"59\") → 59", 229 " ▶︎ 60: Symbol(\"60\") → 60", 230 " ▶︎ 61: Symbol(\"61\") → 61", 231 " ▶︎ 62: Symbol(\"62\") → 62", 232 " ▶︎ 63: Symbol(\"63\") → 63", 233 " ▶︎ 64: Symbol(\"64\") → 64", 234 " ▶︎ 65: Symbol(\"65\") → 65", 235 " ▶︎ 66: Symbol(\"66\") → 66", 236 " ▶︎ 67: Symbol(\"67\") → 67", 237 " ▶︎ 68: Symbol(\"68\") → 68", 238 " ▶︎ 69: Symbol(\"69\") → 69", 239 " ▶︎ 70: Symbol(\"70\") → 70", 240 " ▶︎ 71: Symbol(\"71\") → 71", 241 " ▶︎ 72: Symbol(\"72\") → 72", 242 " ▶︎ 73: Symbol(\"73\") → 73", 243 " ▶︎ 74: Symbol(\"74\") → 74", 244 " ▶︎ 75: Symbol(\"75\") → 75", 245 " ▶︎ 76: Symbol(\"76\") → 76", 246 " ▶︎ 77: Symbol(\"77\") → 77", 247 " ▶︎ 78: Symbol(\"78\") → 78", 248 " ▶︎ 79: Symbol(\"79\") → 79", 249 " ▶︎ 80: Symbol(\"80\") → 80", 250 " ▶︎ 81: Symbol(\"81\") → 81", 251 " ▶︎ 82: Symbol(\"82\") → 82", 252 " ▶︎ 83: Symbol(\"83\") → 83", 253 " ▶︎ 84: Symbol(\"84\") → 84", 254 " ▶︎ 85: Symbol(\"85\") → 85", 255 " ▶︎ 86: Symbol(\"86\") → 86", 256 " ▶︎ 87: Symbol(\"87\") → 87", 257 " ▶︎ 88: Symbol(\"88\") → 88", 258 " ▶︎ 89: Symbol(\"89\") → 89", 259 " ▶︎ 90: Symbol(\"90\") → 90", 260 " ▶︎ 91: Symbol(\"91\") → 91", 261 " ▶︎ 92: Symbol(\"92\") → 92", 262 " ▶︎ 93: Symbol(\"93\") → 93", 263 " ▶︎ 94: Symbol(\"94\") → 94", 264 " ▶︎ 95: Symbol(\"95\") → 95", 265 " ▶︎ 96: Symbol(\"96\") → 96", 266 " ▶︎ 97: Symbol(\"97\") → 97", 267 " ▶︎ 98: Symbol(\"98\") → 98", 268 " ▶︎ 99: Symbol(\"99\") → 99", 269 " ▶︎ [100…199]", 270 " ▶︎ [200…299]", 271 " ▶︎ [300…330]", 272 " ▶︎ <prototype>: Map.prototype { … }" 273 ], 274 275 // new Set(Array.from({ length: 2 }).map((el, i) => ({ value: i }))) 276 [ 277 "▼ Set [ {…}, {…} ]", 278 " ├ size: 2", 279 " ▼ <entries>", 280 " ▼ 0: Object { value: 0 }", 281 " ├ value: 0", 282 " ▶︎ <prototype>: Object { … }", 283 " ▶︎ 1: Object { value: 1 }", 284 " ▶︎ <prototype>: Set.prototype { … }" 285 ], 286 287 // new Set(Array.from({ length: 20 }).map((el, i) => i)) 288 [ 289 "▼ Set(20) [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, … ]", 290 " ├ size: 20", 291 " ▼ <entries>", 292 " ├ 0: 0", 293 " ├ 1: 1", 294 " ├ 2: 2", 295 " ├ 3: 3", 296 " ├ 4: 4", 297 " ├ 5: 5", 298 " ├ 6: 6", 299 " ├ 7: 7", 300 " ├ 8: 8", 301 " ├ 9: 9", 302 " ├ 10: 10", 303 " ├ 11: 11", 304 " ├ 12: 12", 305 " ├ 13: 13", 306 " ├ 14: 14", 307 " ├ 15: 15", 308 " ├ 16: 16", 309 " ├ 17: 17", 310 " ├ 18: 18", 311 " ├ 19: 19", 312 " ▶︎ <prototype>: Set.prototype { … }" 313 ], 314 315 // new Set(Array.from({ length: 222 }).map((el, i) => i)) 316 [ 317 "▼ Set(222) [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, … ]", 318 " ├ size: 222", 319 " ▼ <entries>", 320 " ▼ [0…99]", 321 " ├ 0: 0", 322 " ├ 1: 1", 323 " ├ 2: 2", 324 " ├ 3: 3", 325 " ├ 4: 4", 326 " ├ 5: 5", 327 " ├ 6: 6", 328 " ├ 7: 7", 329 " ├ 8: 8", 330 " ├ 9: 9", 331 " ├ 10: 10", 332 " ├ 11: 11", 333 " ├ 12: 12", 334 " ├ 13: 13", 335 " ├ 14: 14", 336 " ├ 15: 15", 337 " ├ 16: 16", 338 " ├ 17: 17", 339 " ├ 18: 18", 340 " ├ 19: 19", 341 " ├ 20: 20", 342 " ├ 21: 21", 343 " ├ 22: 22", 344 " ├ 23: 23", 345 " ├ 24: 24", 346 " ├ 25: 25", 347 " ├ 26: 26", 348 " ├ 27: 27", 349 " ├ 28: 28", 350 " ├ 29: 29", 351 " ├ 30: 30", 352 " ├ 31: 31", 353 " ├ 32: 32", 354 " ├ 33: 33", 355 " ├ 34: 34", 356 " ├ 35: 35", 357 " ├ 36: 36", 358 " ├ 37: 37", 359 " ├ 38: 38", 360 " ├ 39: 39", 361 " ├ 40: 40", 362 " ├ 41: 41", 363 " ├ 42: 42", 364 " ├ 43: 43", 365 " ├ 44: 44", 366 " ├ 45: 45", 367 " ├ 46: 46", 368 " ├ 47: 47", 369 " ├ 48: 48", 370 " ├ 49: 49", 371 " ├ 50: 50", 372 " ├ 51: 51", 373 " ├ 52: 52", 374 " ├ 53: 53", 375 " ├ 54: 54", 376 " ├ 55: 55", 377 " ├ 56: 56", 378 " ├ 57: 57", 379 " ├ 58: 58", 380 " ├ 59: 59", 381 " ├ 60: 60", 382 " ├ 61: 61", 383 " ├ 62: 62", 384 " ├ 63: 63", 385 " ├ 64: 64", 386 " ├ 65: 65", 387 " ├ 66: 66", 388 " ├ 67: 67", 389 " ├ 68: 68", 390 " ├ 69: 69", 391 " ├ 70: 70", 392 " ├ 71: 71", 393 " ├ 72: 72", 394 " ├ 73: 73", 395 " ├ 74: 74", 396 " ├ 75: 75", 397 " ├ 76: 76", 398 " ├ 77: 77", 399 " ├ 78: 78", 400 " ├ 79: 79", 401 " ├ 80: 80", 402 " ├ 81: 81", 403 " ├ 82: 82", 404 " ├ 83: 83", 405 " ├ 84: 84", 406 " ├ 85: 85", 407 " ├ 86: 86", 408 " ├ 87: 87", 409 " ├ 88: 88", 410 " ├ 89: 89", 411 " ├ 90: 90", 412 " ├ 91: 91", 413 " ├ 92: 92", 414 " ├ 93: 93", 415 " ├ 94: 94", 416 " ├ 95: 95", 417 " ├ 96: 96", 418 " ├ 97: 97", 419 " ├ 98: 98", 420 " ├ 99: 99", 421 " ▶︎ [100…199]", 422 " ▶︎ [200…221]", 423 " ▶︎ <prototype>: Set.prototype { … }" 424 ], 425 426 // new Temporal.Instant(355924804000000000n) 427 [ 428 "▼ Temporal.Instant 1981-04-12T12:00:04Z", 429 " ▶︎ <prototype>: Object { … }" 430 ], 431 432 // new Temporal.PlainDate(2021, 7, 1, "coptic") 433 [ 434 "▼ Temporal.PlainDate 2021-07-01[u-ca=coptic]", 435 " ▶︎ <prototype>: Object { … }" 436 ], 437 438 // new Temporal.PlainDateTime(2021, 7, 1, 0, 0, 0, 0, 0, 0, "gregory") 439 [ 440 "▼ Temporal.PlainDateTime 2021-07-01T00:00:00[u-ca=gregory]", 441 " ▶︎ <prototype>: Object { … }" 442 ], 443 444 // new Temporal.PlainMonthDay(7, 1, "chinese") 445 [ 446 "▼ Temporal.PlainMonthDay 1972-07-01[u-ca=chinese]", 447 " ▶︎ <prototype>: Object { … }" 448 ], 449 450 // new Temporal.PlainTime(4, 20) 451 [ 452 "▼ Temporal.PlainTime 04:20:00", 453 " ▶︎ <prototype>: Object { … }" 454 ], 455 456 // new Temporal.PlainYearMonth(2021, 7, "indian") 457 [ 458 "▼ Temporal.PlainYearMonth 2021-07-01[u-ca=indian]", 459 " ▶︎ <prototype>: Object { … }" 460 ], 461 462 // new Temporal.ZonedDateTime(0n, "America/New_York") 463 [ 464 "▼ Temporal.ZonedDateTime 1969-12-31T19:00:00-05:00[America/New_York]", 465 " ▶︎ <prototype>: Object { … }" 466 ], 467 468 // Temporal.Duration.from({ years: 1 }) 469 [ 470 "▼ Temporal.Duration P1Y", 471 " ▶︎ <prototype>: Object { … }" 472 ], 473 474 // myPolicy.createHTML("hello") 475 [ 476 "▼ TrustedHTML \"<my-policy>hello</my-policy>\"", 477 " ▶︎ <prototype>: TrustedHTMLPrototype { toJSON: toJSON(), toString: toString(), … }" 478 ], 479 480 // myPolicy.createScript("const hello = 'world'") 481 [ 482 "▼ TrustedScript \"/* myPolicy */ const hello = 'world'\"", 483 " ▶︎ <prototype>: TrustedScriptPrototype { toJSON: toJSON(), toString: toString(), … }" 484 ], 485 486 // myPolicy.createScriptURL("https://example.com/trusted") 487 [ 488 "▼ TrustedScriptURL https://example.com/trusted?myPolicy", 489 " ▶︎ <prototype>: TrustedScriptURLPrototype { toJSON: toJSON(), toString: toString(), … }" 490 ], 491 492 // const formData = new FormData(); 493 // formData.append("a", 1); 494 // formData.append("a", 2); 495 // formData.append("b", 3); 496 // formData; 497 // 498 [ 499 "▼ FormData(3) { a → \"1\", a → \"2\", b → \"3\" }", 500 " ▼ <entries>", 501 " ▼ 0: a → \"1\"", 502 " ├ <key>: \"a\"", 503 " ├ <value>: \"1\"", 504 " ▶︎ 1: a → \"2\"", 505 " ▶︎ 2: b → \"3\"", 506 " ▶︎ <prototype>: FormDataPrototype { append: append(), delete: delete(), get: get(), … }" 507 ], 508 509 // customElements.define("fx-test", class extends HTMLElement {}); 510 // const { states } = document.createElement("fx-test").attachInternals(); 511 // states.add("custom-state"); 512 // states.add("another-custom-state"); 513 // states; 514 // 515 [ 516 "▼ CustomStateSet [ \"custom-state\", \"another-custom-state\" ]", 517 " ├ size: 2", 518 " ▼ <entries>", 519 " ├ 0: \"custom-state\"", 520 " ├ 1: \"another-custom-state\"", 521 " ▶︎ <prototype>: CustomStateSetPrototype { add: add(), delete: delete(), clear: clear(), … }" 522 ], 523 524 // CSS.highlights.set("search", new Highlight()); 525 // CSS.highlights.set("glow", new Highlight()); 526 // CSS.highlights.set("anchor", new Highlight()); 527 // CSS.highlights; 528 // 529 [ 530 "▼ HighlightRegistry(3) { search → Highlight, glow → Highlight, anchor → Highlight }", 531 " ├ size: 3", 532 " ▼ <entries>", 533 " ▼ 0: search → Highlight { priority: 0, type: \"highlight\", size: 0 }", 534 " ├ <key>: \"search\"", 535 " ▶︎ <value>: Highlight { priority: 0, type: \"highlight\", size: 0 }", 536 " ▶︎ 1: glow → Highlight { priority: 0, type: \"highlight\", size: 0 }", 537 " ▶︎ 2: anchor → Highlight { priority: 0, type: \"highlight\", size: 0 }", 538 " ▶︎ <prototype>: HighlightRegistryPrototype { set: set(), clear: clear(), delete: delete(), … }" 539 ], 540 541 // new URLSearchParams([ 542 // ["a", 1], 543 // ["a", 2], 544 // ["b", 3], 545 // ["b", 3], 546 // ["b", 5], 547 // ["c", "this is 6"], 548 // ["d", 7], 549 // ["e", 8], 550 // ["f", 9], 551 // ["g", 10], 552 // ["h", 11], 553 // ]) 554 [ 555 "▼ URLSearchParams(11) { a → \"1\", a → \"2\", b → \"3\", b → \"3\", b → \"5\", c → \"this is 6\", d → \"7\", e → \"8\", f → \"9\", g → \"10\", … }", 556 " ├ size: 11", 557 " ▼ <entries>", 558 " ▼ 0: a → \"1\"", 559 " ├ <key>: \"a\"", 560 " ├ <value>: \"1\"", 561 " ▶︎ 1: a → \"2\"", 562 " ▶︎ 2: b → \"3\"", 563 " ▶︎ 3: b → \"3\"", 564 " ▶︎ 4: b → \"5\"", 565 " ▶︎ 5: c → \"this is 6\"", 566 " ▶︎ 6: d → \"7\"", 567 " ▶︎ 7: e → \"8\"", 568 " ▶︎ 8: f → \"9\"", 569 " ▶︎ 9: g → \"10\"", 570 " ▶︎ 10: h → \"11\"", 571 " ▶︎ <prototype>: URLSearchParamsPrototype { append: append(), delete: delete(), get: get(), … }" 572 ], 573 574 // new Error("foo") 575 "Error: foo", 576 577 // throw new Error("Long error ".repeat(10000)); 578 "Error: Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error…", 579 580 // throw `“https://evil.com/?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa“ is evil and “https://not-so-evil.com/?bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb“ is not good either`; 581 // 582 "“https://evil.com/?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa“ is evil and “https://not-so-evil.com/?bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb“ is not good either", 583 584 // Error("bar") 585 "Error: bar", 586 587 // function bar() { 588 // asdf(); 589 // } 590 // function foo() { 591 // bar(); 592 // } 593 // 594 // foo(); 595 // 596 "ReferenceError: asdf is not defined", 597 598 // eval("let a, a") 599 "SyntaxError: redeclaration of let a", 600 601 // throw ""; 602 "<empty string>", 603 604 // throw false; 605 "false", 606 607 // throw undefined; 608 "undefined", 609 610 // throw 0; 611 "0", 612 613 // throw { vegetable: "cucumber" }; 614 [ 615 "▼ Object { vegetable: \"cucumber\" }", 616 " ├ vegetable: \"cucumber\"", 617 " ▶︎ <prototype>: Object { … }" 618 ], 619 620 // throw Symbol("potato"); 621 "Symbol(\"potato\")", 622 623 // var err = new Error("pineapple"); 624 // err.name = "JuicyError"; 625 // err.flavor = "delicious"; 626 // throw err; 627 // 628 "JuicyError: pineapple", 629 630 // var originalError = new SyntaxError("original error"); 631 // var err = new Error("something went wrong", { 632 // cause: originalError, 633 // }); 634 // throw err; 635 // 636 "Error: something went wrongCaused by: SyntaxError: original error", 637 638 // var a = new Error("err-a"); 639 // var b = new Error("err-b", { cause: a }); 640 // var c = new Error("err-c", { cause: b }); 641 // var d = new Error("err-d", { cause: c }); 642 // throw d; 643 // 644 "Error: err-dCaused by: Error: err-cCaused by: Error: err-bCaused by: Error: err-a", 645 646 // var a = new Error("err-a", { cause: b }); 647 // var b = new Error("err-b", { cause: a }); 648 // throw b; 649 // 650 "Error: err-bCaused by: Error: err-aCaused by: Error: err-bCaused by: Error: err-a", 651 652 // throw new Error("null cause", { cause: null }); 653 "Error: null causeCaused by: null", 654 655 // throw new Error("number cause", { cause: 0 }); 656 "Error: number causeCaused by: 0", 657 658 // throw new Error("string cause", { cause: "cause message" }); 659 "Error: string causeCaused by: \"cause message\"", 660 661 // throw new Error("object cause", { 662 // cause: { code: 234, message: "ERR_234" }, 663 // }); 664 // 665 "Error: object causeCaused by: Object { … }", 666 667 // Promise.reject("") 668 [ 669 "▼ Promise { <state>: \"rejected\", <reason>: \"\" }", 670 " ├ <state>: \"rejected\"", 671 " ▶︎ <prototype>: Promise.prototype { … }" 672 ], 673 674 // Promise.reject("tomato") 675 [ 676 "▼ Promise { <state>: \"rejected\", <reason>: \"tomato\" }", 677 " ├ <state>: \"rejected\"", 678 " ├ <reason>: \"tomato\"", 679 " ▶︎ <prototype>: Promise.prototype { … }" 680 ], 681 682 // Promise.reject(false) 683 [ 684 "▼ Promise { <state>: \"rejected\", <reason>: false }", 685 " ├ <state>: \"rejected\"", 686 " ▶︎ <prototype>: Promise.prototype { … }" 687 ], 688 689 // Promise.reject(0) 690 [ 691 "▼ Promise { <state>: \"rejected\", <reason>: 0 }", 692 " ├ <state>: \"rejected\"", 693 " ▶︎ <prototype>: Promise.prototype { … }" 694 ], 695 696 // Promise.reject(null) 697 [ 698 "▼ Promise { <state>: \"rejected\", <reason>: null }", 699 " ├ <state>: \"rejected\"", 700 " ├ <reason>: null", 701 " ▶︎ <prototype>: Promise.prototype { … }" 702 ], 703 704 // Promise.reject(undefined) 705 [ 706 "▼ Promise { <state>: \"rejected\", <reason>: undefined }", 707 " ├ <state>: \"rejected\"", 708 " ├ <reason>: undefined", 709 " ▶︎ <prototype>: Promise.prototype { … }" 710 ], 711 712 // Promise.reject(Symbol("potato")) 713 [ 714 "▼ Promise { <state>: \"rejected\", <reason>: Symbol(\"potato\") }", 715 " ├ <state>: \"rejected\"", 716 " ├ <reason>: Symbol(\"potato\")", 717 " ▶︎ <prototype>: Promise.prototype { … }" 718 ], 719 720 // Promise.reject({vegetable: "cucumber"}) 721 [ 722 "▼ Promise { <state>: \"rejected\", <reason>: {…} }", 723 " ├ <state>: \"rejected\"", 724 " ▶︎ <reason>: Object { vegetable: \"cucumber\" }", 725 " ▶︎ <prototype>: Promise.prototype { … }" 726 ], 727 728 // Promise.reject(new Error("pumpkin")) 729 [ 730 "▼ Promise { <state>: \"rejected\", <reason>: Error }", 731 " ├ <state>: \"rejected\"", 732 " ▶︎ <reason>: Error: pumpkin", 733 " ▶︎ <prototype>: Promise.prototype { … }" 734 ], 735 736 // var err = new Error("pineapple"); 737 // err.name = "JuicyError"; 738 // err.flavor = "delicious"; 739 // Promise.reject(err); 740 // 741 [ 742 "▼ Promise { <state>: \"rejected\", <reason>: JuicyError }", 743 " ├ <state>: \"rejected\"", 744 " ▶︎ <reason>: JuicyError: pineapple", 745 " ▶︎ <prototype>: Promise.prototype { … }" 746 ], 747 748 // Promise.resolve().then(() => { 749 // try { 750 // unknownFunc(); 751 // } catch(e) { 752 // throw new Error("something went wrong", { cause: e }) 753 // } 754 // }) 755 [ 756 "▼ Promise { <state>: \"pending\" }", 757 " ├ <state>: \"rejected\"", 758 " ▶︎ <reason>: Error: something went wrong", 759 " ▶︎ <prototype>: Promise.prototype { … }" 760 ], 761 ];