You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/rules/no-hooks.md
+15
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,21 @@ describe('foo', function () {
43
43
});
44
44
```
45
45
46
+
## Options
47
+
48
+
This rule supports the following options:
49
+
50
+
*`allow`: An array containing the names of hooks to allow. Defaults to an empty array.
51
+
52
+
```json
53
+
{
54
+
"rules": {
55
+
"mocha/no-hooks": ["error", {"allow": ["after"]}]
56
+
}
57
+
}
58
+
```
59
+
60
+
46
61
## When Not To Use It
47
62
48
63
* If you use another library which exposes a similar API as mocha (e.g. `before`, `after`), you should turn this rule off, because it would raise warnings.
0 commit comments