Skip to content
This repository was archived by the owner on Mar 7, 2019. It is now read-only.

Commit 3052c8a

Browse files
feat: allow 6 nested callbacks in Mocha test files
1 parent aca4c5e commit 3052c8a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

environments/mocha/recommended.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ module.exports = {
2424
},
2525

2626
rules: {
27+
// Set Maximum Depth of Nested Callbacks
28+
// This rule is aimed at increasing code clarity by discouraging deeply nesting callbacks.
29+
// Allow some extra nesting for Mocha tests, due to Mocha's test coding patterns encouraging
30+
// some extra callback nesting.
31+
'max-nested-callbacks': ['warn', 6],
32+
2733
// Enforces handling of callbacks for async tests
2834
// Mocha allows you to write asynchronous tests by adding a done callback to the parameters of
2935
// your test function. It is easy to forget calling this callback after the asynchronous

0 commit comments

Comments
 (0)