Skip to content

Commit e681a45

Browse files
authored
readme: add note about uncaught exceptions
fixes issue avajs#917
1 parent c95fa7f commit e681a45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ test.failing('demonstrate some bug', t => {
433433

434434
AVA lets you register hooks that are run before and after your tests. This allows you to run setup and/or teardown code.
435435

436-
`test.before()` registers a hook to be run before the first test in your test file. Similarly `test.after()` registers a hook to be run after the last test. Use `test.after.always()` to register a hook that will **always** run once your tests and other hooks complete. `.always()` hooks run regardless of whether there were earlier failures, so they are ideal for cleanup tasks.
436+
`test.before()` registers a hook to be run before the first test in your test file. Similarly `test.after()` registers a hook to be run after the last test. Use `test.after.always()` to register a hook that will **always** run once your tests and other hooks complete. `.always()` hooks run regardless of whether there were earlier failures, so they are ideal for cleanup tasks. **Note**: In the case of uncaught exceptions, `test.after.always()` will not be called.
437437

438438
`test.beforeEach()` registers a hook to be run before each test in your test file. Similarly `test.afterEach()` a hook to be run after each test. Use `test.afterEach.always()` to register an after hook that is called even if other test hooks, or the test itself, fail. `.always()` hooks are ideal for cleanup tasks.
439439

0 commit comments

Comments
 (0)