You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[node native ES modules support](#nodejs-native-esm-support)
42
40
-[detects multiple calls to `done()`](#detects-multiple-calls-to-done)
@@ -449,9 +447,43 @@ setTimeout(function() {
449
447
}, 5000);
450
448
```
451
449
450
+
### Failing Hooks
451
+
452
+
Upon a failing `before` hook all tests in the current suite and also its nested suites will be skipped. Skipped tests are included in the test results and marked as **skipped**. A skipped test is not considered a failed test.
453
+
454
+
```js
455
+
describe('outer', function() {
456
+
before(function() {
457
+
thrownewError('Exception in before hook');
458
+
});
459
+
460
+
it('should skip this outer test', function() {
461
+
// will be skipped and listed as 'skipped'
462
+
});
463
+
464
+
after(function() {
465
+
// will be executed
466
+
});
467
+
468
+
describe('inner', function() {
469
+
before(function() {
470
+
// will be skipped
471
+
});
472
+
473
+
it('should skip this inner test', function() {
474
+
// will be skipped and listed as 'skipped'
475
+
});
476
+
477
+
after(function() {
478
+
// will be skipped
479
+
});
480
+
});
481
+
});
482
+
```
483
+
452
484
## Pending Tests
453
485
454
-
"Pending"--as in "someone should write these test cases eventually"--test-cases are simply those _without_ a callback:
486
+
"Pending" - as in "someone should write these test cases eventually" - test-cases are simply those _without_ a callback:
0 commit comments