Skip to content

Conversation

@cgcgbcbc
Copy link
Contributor

resolve #820

readme.md Outdated

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

**Note**: if `--fail-fast` flag is provided, ava will stop after first test failure and `.always` hook will **NOT** run.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

**Note**: If the `--fail-fast` flag is specified, AVA will stop after the first test failure and the `.always` hook will **not** run.

@novemberborn novemberborn merged commit 6f83264 into avajs:master May 24, 2016
@novemberborn
Copy link
Member

Thanks @cgcgbcbc!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

failFast causes process to exit before always.afterEach hooks complete

3 participants