From e681a454eebc2ed8d41070d52af3b0edcecd346d Mon Sep 17 00:00:00 2001 From: Arve Seljebu Date: Tue, 14 Jun 2016 07:17:23 +0200 Subject: [PATCH] readme: add note about uncaught exceptions fixes issue #917 --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index c2f0dfecfa..f44ffcf6ee 100644 --- a/readme.md +++ b/readme.md @@ -433,7 +433,7 @@ test.failing('demonstrate some bug', t => { AVA lets you register hooks that are run before and after your tests. This allows you to run setup and/or teardown code. -`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. +`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. `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.