1TAP version 13 2# Subtest: describe hooks 3 # Subtest: 1 4 ok 1 - 1 5 --- 6 duration_ms: * 7 ... 8 # Subtest: 2 9 ok 2 - 2 10 --- 11 duration_ms: * 12 ... 13 # Subtest: nested 14 # Subtest: nested 1 15 ok 1 - nested 1 16 --- 17 duration_ms: * 18 ... 19 # Subtest: nested 2 20 ok 2 - nested 2 21 --- 22 duration_ms: * 23 ... 24 1..2 25 ok 3 - nested 26 --- 27 duration_ms: * 28 type: 'suite' 29 ... 30 1..3 31ok 1 - describe hooks 32 --- 33 duration_ms: * 34 type: 'suite' 35 ... 36# Subtest: before throws 37 # Subtest: 1 38 not ok 1 - 1 39 --- 40 duration_ms: * 41 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' 42 failureType: 'cancelledByParent' 43 error: 'test did not finish before its parent and was cancelled' 44 code: 'ERR_TEST_FAILURE' 45 ... 46 # Subtest: 2 47 not ok 2 - 2 48 --- 49 duration_ms: * 50 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' 51 failureType: 'cancelledByParent' 52 error: 'test did not finish before its parent and was cancelled' 53 code: 'ERR_TEST_FAILURE' 54 ... 55 1..2 56not ok 2 - before throws 57 --- 58 duration_ms: * 59 type: 'suite' 60 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' 61 failureType: 'hookFailed' 62 error: 'before' 63 code: 'ERR_TEST_FAILURE' 64 stack: |- 65 * 66 * 67 * 68 * 69 * 70 * 71 * 72 * 73 * 74 ... 75# Subtest: after throws 76 # Subtest: 1 77 ok 1 - 1 78 --- 79 duration_ms: * 80 ... 81 # Subtest: 2 82 ok 2 - 2 83 --- 84 duration_ms: * 85 ... 86 1..2 87not ok 3 - after throws 88 --- 89 duration_ms: * 90 type: 'suite' 91 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' 92 failureType: 'hookFailed' 93 error: 'after' 94 code: 'ERR_TEST_FAILURE' 95 stack: |- 96 * 97 * 98 * 99 * 100 * 101 * 102 * 103 * 104 * 105 ... 106# Subtest: beforeEach throws 107 # Subtest: 1 108 not ok 1 - 1 109 --- 110 duration_ms: * 111 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' 112 failureType: 'hookFailed' 113 error: 'beforeEach' 114 code: 'ERR_TEST_FAILURE' 115 stack: |- 116 * 117 * 118 * 119 * 120 * 121 * 122 * 123 async Promise.all (index 0) 124 * 125 * 126 ... 127 # Subtest: 2 128 not ok 2 - 2 129 --- 130 duration_ms: * 131 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' 132 failureType: 'hookFailed' 133 error: 'beforeEach' 134 code: 'ERR_TEST_FAILURE' 135 stack: |- 136 * 137 * 138 * 139 * 140 * 141 * 142 * 143 * 144 ... 145 1..2 146not ok 4 - beforeEach throws 147 --- 148 duration_ms: * 149 type: 'suite' 150 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' 151 failureType: 'subtestsFailed' 152 error: '2 subtests failed' 153 code: 'ERR_TEST_FAILURE' 154 ... 155# Subtest: afterEach throws 156 # Subtest: 1 157 not ok 1 - 1 158 --- 159 duration_ms: * 160 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' 161 failureType: 'hookFailed' 162 error: 'afterEach' 163 code: 'ERR_TEST_FAILURE' 164 stack: |- 165 * 166 * 167 * 168 * 169 * 170 * 171 * 172 * 173 async Promise.all (index 0) 174 * 175 ... 176 # Subtest: 2 177 not ok 2 - 2 178 --- 179 duration_ms: * 180 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' 181 failureType: 'hookFailed' 182 error: 'afterEach' 183 code: 'ERR_TEST_FAILURE' 184 stack: |- 185 * 186 * 187 * 188 * 189 * 190 * 191 * 192 * 193 * 194 ... 195 1..2 196not ok 5 - afterEach throws 197 --- 198 duration_ms: * 199 type: 'suite' 200 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' 201 failureType: 'subtestsFailed' 202 error: '2 subtests failed' 203 code: 'ERR_TEST_FAILURE' 204 ... 205# Subtest: afterEach when test fails 206 # Subtest: 1 207 not ok 1 - 1 208 --- 209 duration_ms: * 210 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' 211 failureType: 'testCodeFailure' 212 error: 'test' 213 code: 'ERR_TEST_FAILURE' 214 stack: |- 215 * 216 * 217 * 218 * 219 * 220 * 221 new Promise (<anonymous>) 222 * 223 * 224 Array.map (<anonymous>) 225 ... 226 # Subtest: 2 227 ok 2 - 2 228 --- 229 duration_ms: * 230 ... 231 1..2 232not ok 6 - afterEach when test fails 233 --- 234 duration_ms: * 235 type: 'suite' 236 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' 237 failureType: 'subtestsFailed' 238 error: '1 subtest failed' 239 code: 'ERR_TEST_FAILURE' 240 ... 241# Subtest: afterEach throws and test fails 242 # Subtest: 1 243 not ok 1 - 1 244 --- 245 duration_ms: * 246 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' 247 failureType: 'testCodeFailure' 248 error: 'test' 249 code: 'ERR_TEST_FAILURE' 250 stack: |- 251 * 252 * 253 * 254 * 255 * 256 * 257 new Promise (<anonymous>) 258 * 259 * 260 Array.map (<anonymous>) 261 ... 262 # Subtest: 2 263 not ok 2 - 2 264 --- 265 duration_ms: * 266 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):3' 267 failureType: 'hookFailed' 268 error: 'afterEach' 269 code: 'ERR_TEST_FAILURE' 270 stack: |- 271 * 272 * 273 * 274 * 275 * 276 * 277 * 278 * 279 * 280 ... 281 1..2 282not ok 7 - afterEach throws and test fails 283 --- 284 duration_ms: * 285 type: 'suite' 286 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' 287 failureType: 'subtestsFailed' 288 error: '2 subtests failed' 289 code: 'ERR_TEST_FAILURE' 290 ... 291# Subtest: test hooks 292 # Subtest: 1 293 ok 1 - 1 294 --- 295 duration_ms: * 296 ... 297 # Subtest: 2 298 ok 2 - 2 299 --- 300 duration_ms: * 301 ... 302 # Subtest: nested 303 # Subtest: nested 1 304 ok 1 - nested 1 305 --- 306 duration_ms: * 307 ... 308 # Subtest: nested 2 309 ok 2 - nested 2 310 --- 311 duration_ms: * 312 ... 313 1..2 314 ok 3 - nested 315 --- 316 duration_ms: * 317 ... 318 1..3 319ok 8 - test hooks 320 --- 321 duration_ms: * 322 ... 323# Subtest: t.before throws 324 # Subtest: 1 325 not ok 1 - 1 326 --- 327 duration_ms: * 328 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' 329 failureType: 'hookFailed' 330 error: 'before' 331 code: 'ERR_TEST_FAILURE' 332 stack: |- 333 * 334 * 335 * 336 * 337 * 338 * 339 * 340 * 341 * 342 * 343 ... 344 # Subtest: 2 345 not ok 2 - 2 346 --- 347 duration_ms: * 348 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' 349 failureType: 'hookFailed' 350 error: 'before' 351 code: 'ERR_TEST_FAILURE' 352 stack: |- 353 * 354 * 355 * 356 * 357 * 358 * 359 * 360 * 361 * 362 * 363 ... 364 1..2 365not ok 9 - t.before throws 366 --- 367 duration_ms: * 368 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' 369 failureType: 'subtestsFailed' 370 error: '2 subtests failed' 371 code: 'ERR_TEST_FAILURE' 372 ... 373# Subtest: t.beforeEach throws 374 # Subtest: 1 375 not ok 1 - 1 376 --- 377 duration_ms: * 378 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' 379 failureType: 'hookFailed' 380 error: 'beforeEach' 381 code: 'ERR_TEST_FAILURE' 382 stack: |- 383 * 384 * 385 * 386 * 387 * 388 * 389 * 390 * 391 * 392 * 393 ... 394 # Subtest: 2 395 not ok 2 - 2 396 --- 397 duration_ms: * 398 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' 399 failureType: 'hookFailed' 400 error: 'beforeEach' 401 code: 'ERR_TEST_FAILURE' 402 stack: |- 403 * 404 * 405 * 406 * 407 * 408 * 409 * 410 * 411 * 412 * 413 ... 414 1..2 415not ok 10 - t.beforeEach throws 416 --- 417 duration_ms: * 418 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' 419 failureType: 'subtestsFailed' 420 error: '2 subtests failed' 421 code: 'ERR_TEST_FAILURE' 422 ... 423# Subtest: t.afterEach throws 424 # Subtest: 1 425 not ok 1 - 1 426 --- 427 duration_ms: * 428 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' 429 failureType: 'hookFailed' 430 error: 'afterEach' 431 code: 'ERR_TEST_FAILURE' 432 stack: |- 433 * 434 * 435 * 436 * 437 * 438 * 439 * 440 * 441 * 442 * 443 ... 444 # Subtest: 2 445 not ok 2 - 2 446 --- 447 duration_ms: * 448 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' 449 failureType: 'hookFailed' 450 error: 'afterEach' 451 code: 'ERR_TEST_FAILURE' 452 stack: |- 453 * 454 * 455 * 456 * 457 * 458 * 459 * 460 * 461 * 462 * 463 ... 464 1..2 465not ok 11 - t.afterEach throws 466 --- 467 duration_ms: * 468 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' 469 failureType: 'subtestsFailed' 470 error: '2 subtests failed' 471 code: 'ERR_TEST_FAILURE' 472 ... 473# Subtest: afterEach when test fails 474 # Subtest: 1 475 not ok 1 - 1 476 --- 477 duration_ms: * 478 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' 479 failureType: 'testCodeFailure' 480 error: 'test' 481 code: 'ERR_TEST_FAILURE' 482 stack: |- 483 * 484 * 485 * 486 * 487 * 488 * 489 * 490 * 491 * 492 ... 493 # Subtest: 2 494 ok 2 - 2 495 --- 496 duration_ms: * 497 ... 498 1..2 499not ok 12 - afterEach when test fails 500 --- 501 duration_ms: * 502 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' 503 failureType: 'subtestsFailed' 504 error: '1 subtest failed' 505 code: 'ERR_TEST_FAILURE' 506 ... 507# Subtest: afterEach throws and test fails 508 # Subtest: 1 509 not ok 1 - 1 510 --- 511 duration_ms: * 512 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' 513 failureType: 'testCodeFailure' 514 error: 'test' 515 code: 'ERR_TEST_FAILURE' 516 stack: |- 517 * 518 * 519 * 520 * 521 * 522 * 523 * 524 * 525 * 526 ... 527 # Subtest: 2 528 not ok 2 - 2 529 --- 530 duration_ms: * 531 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):11' 532 failureType: 'hookFailed' 533 error: 'afterEach' 534 code: 'ERR_TEST_FAILURE' 535 stack: |- 536 * 537 * 538 * 539 * 540 * 541 * 542 * 543 * 544 * 545 * 546 ... 547 1..2 548not ok 13 - afterEach throws and test fails 549 --- 550 duration_ms: * 551 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' 552 failureType: 'subtestsFailed' 553 error: '2 subtests failed' 554 code: 'ERR_TEST_FAILURE' 555 ... 556# Subtest: t.after() is called if test body throws 557not ok 14 - t.after() is called if test body throws 558 --- 559 duration_ms: * 560 location: '/test/fixtures/test-runner/output/hooks.js:(LINE):1' 561 failureType: 'testCodeFailure' 562 error: 'bye' 563 code: 'ERR_TEST_FAILURE' 564 stack: |- 565 * 566 * 567 * 568 * 569 ... 570# - after() called 5711..14 572# before 1 called 573# before 2 called 574# after 1 called 575# after 2 called 576# tests 38 577# suites 8 578# pass 14 579# fail 22 580# cancelled 2 581# skipped 0 582# todo 0 583# duration_ms * 584