test(linter/no-promise-executor-return): Regenerate tests for rule.#17901
test(linter/no-promise-executor-return): Regenerate tests for rule.#17901graphite-app[bot] merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request regenerates comprehensive test coverage for the no-promise-executor-return ESLint rule, replacing the minimal tests from the original implementation. The PR ports the full test suite from ESLint, significantly improving test coverage from approximately 10 test cases to 175 test cases (89 pass cases and 86 fail cases).
Changes:
- Replaced minimal test suite with comprehensive ESLint-sourced tests
- Regenerated snapshot file with 58 error outputs covering all failure scenarios
- Added TODO comments for known limitations with Promise identifier shadowing
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| crates/oxc_linter/src/snapshots/eslint_no_promise_executor_return.snap | Regenerated snapshot with comprehensive test coverage, expanding from ~30 lines to 408 lines with detailed error messages |
| crates/oxc_linter/src/rules/eslint/no_promise_executor_return.rs | Replaced minimal test suite with comprehensive tests covering edge cases, arrow functions, nested functions, void expressions, and Promise shadowing scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merging this PR will not alter performance
Comparing Footnotes
|
Merge activity
|
…17901) The original implementation of the rule did not port most of the tests. I'm not sure that it's worth retaining the previous tests, so I just replaced them entirely for now. Almost all the tests pass, thankfully, but a few fail and needed to be commented out. We should probably fix them. Rule was added in #16779.
0a1e125 to
b8a3ca5
Compare
The original implementation of the rule did not port most of the tests. I'm not sure that it's worth retaining the previous tests, so I just replaced them entirely for now.
Almost all the tests pass, thankfully, but a few fail and needed to be commented out. We should probably fix them.
Rule was added in #16779.