Skip to content

Commit 6f83264

Browse files
cgcgbcbcnovemberborn
authored andcommitted
document always hook with fail fast flag (#858)
1 parent 1d51231 commit 6f83264

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,8 @@ AVA lets you register hooks that are run before and after your tests. This allow
436436

437437
`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.
438438

439+
**Note**: If the `--fail-fast` flag is specified, AVA will stop after the first test failure and the `.always` hook will **not** run.
440+
439441
Like `test()` these methods take an optional title and a callback function. The title is shown if your hook fails to execute. The callback is called with an [execution object](#t).
440442

441443
`before` hooks execute before `beforeEach` hooks. `afterEach` hooks execute before `after` hooks. Within their category the hooks execute in the order they were defined.

0 commit comments

Comments
 (0)