Skip to content

test(linter/no-promise-executor-return): Regenerate tests for rule.#17901

Merged
graphite-app[bot] merged 1 commit intomainfrom
regen-tests-for-no-prom
Jan 12, 2026
Merged

test(linter/no-promise-executor-return): Regenerate tests for rule.#17901
graphite-app[bot] merged 1 commit intomainfrom
regen-tests-for-no-prom

Conversation

@connorshea
Copy link
Member

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.

Copilot AI review requested due to automatic review settings January 12, 2026 01:34
@connorshea connorshea requested a review from camc314 as a code owner January 12, 2026 01:34
@github-actions github-actions bot added A-linter Area - Linter C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Jan 12, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 12, 2026

Merging this PR will not alter performance

✅ 4 untouched benchmarks
⏩ 41 skipped benchmarks1


Comparing regen-tests-for-no-prom (0a1e125) with main (e738353)

Open in CodSpeed

Footnotes

  1. 41 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Member

@camchenry camchenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@camchenry camchenry added the 0-merge Merge with Graphite Merge Queue label Jan 12, 2026
Copy link
Member

camchenry commented Jan 12, 2026

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.
@graphite-app graphite-app bot force-pushed the regen-tests-for-no-prom branch from 0a1e125 to b8a3ca5 Compare January 12, 2026 03:47
@graphite-app graphite-app bot merged commit b8a3ca5 into main Jan 12, 2026
20 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 12, 2026
@graphite-app graphite-app bot deleted the regen-tests-for-no-prom branch January 12, 2026 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants