Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(prefer-hooks-on-top): improve message & docs #999

Merged
merged 5 commits into from
Dec 27, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
docs(prefer-hooks-on-top): improve rule description
  • Loading branch information
G-Rath committed Dec 26, 2021
commit c9abd868bb14682cc6775be176666a779f0fcab4
6 changes: 5 additions & 1 deletion docs/rules/prefer-hooks-on-top.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Suggest having hooks before any test cases (`prefer-hooks-on-top`)

All hooks should be defined before the start of the tests
While hooks can be setup anywhere in a test file, they are always called in a
specific order which means it can be confusing if they're intermixed with test
cases.

This rule helps to ensure that hooks are always defined before test cases.

## Rule Details

Expand Down