Add ESLint rule to disallow async describe blocks#6467
Add ESLint rule to disallow async describe blocks#6467Sanenelisiwe1975 wants to merge 1 commit intoOpenZeppelin:masterfrom
Conversation
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
WalkthroughIntroduces ESLint rule enforcement via eslint-plugin-mocha to prevent async test suite declarations. Updates eslint.config.mjs to import the plugin and register the mocha/no-async-suite rule at error level. Adds eslint-plugin-mocha ^11.2.0 as a dev dependency. Removes async modifiers from three describe block callbacks in test files to comply with the new linting rule. Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Mocha ignores the returned Promise from async describe callbacks, which silently swallows any rejections thrown directly in the describe body. Add eslint-plugin-mocha with the mocha/no-async-suite rule to enforce this going forward, and fix the three existing violations.
948bd60 to
0190950
Compare
|
Already solved at #6438 |
Mocha ignores the returned Promise from async describe callbacks, which silently swallows any rejections thrown directly in the describe body. Add eslint-plugin-mocha with the mocha/no-async-suite rule to enforce this going forward, and fix the three existing violations.
Fixes #4943
Mocha ignores the returned Promise from async describe callbacks, which silently swallows any rejections thrown directly in the describe body. Add eslint-plugin-mocha with the mocha/no-async-suite rule to enforce this going forward, and fix the three existing violations.
Fixes #4943
PR Checklist
npx changeset add)