From 5398194811fc22c1937d2d05ef10d5ad86fc5c03 Mon Sep 17 00:00:00 2001 From: Gareth Jones Date: Sun, 26 Dec 2021 13:03:09 +1300 Subject: [PATCH] docs(prefer-hooks-on-top): improve rule description --- docs/rules/prefer-hooks-on-top.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/rules/prefer-hooks-on-top.md b/docs/rules/prefer-hooks-on-top.md index 9cf0e697f..801060541 100644 --- a/docs/rules/prefer-hooks-on-top.md +++ b/docs/rules/prefer-hooks-on-top.md @@ -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