Skip to content

Comments

test(formatter): Add tests for #16179 and #16180#16231

Merged
graphite-app[bot] merged 1 commit intomainfrom
11-28-test_formatter_add_tests_for_16179_and_16180
Nov 28, 2025
Merged

test(formatter): Add tests for #16179 and #16180#16231
graphite-app[bot] merged 1 commit intomainfrom
11-28-test_formatter_add_tests_for_16179_and_16180

Conversation

@leaysgur
Copy link
Member

@leaysgur leaysgur commented Nov 28, 2025

Closes #16179

Bug itself was already fixed by #16224

Copilot AI review requested due to automatic review settings November 28, 2025 08:08
@leaysgur leaysgur requested a review from Dunqing as a code owner November 28, 2025 08:08
@github-actions github-actions bot added A-formatter Area - Formatter C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Nov 28, 2025
Copy link
Member Author

leaysgur commented Nov 28, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

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 PR adds regression tests for two formatter issues (#16179 and #16180) related to JSX ternary expressions with comments. The tests verify that the formatter correctly handles comments in specific positions within JSX ternary operations, ensuring these edge cases don't regress in the future.

Key Changes

  • Added test case for issue #16180: JSX ternary with block comment after consequent element
  • Added test case for issue #16179: JSX nested ternary with block comment after null value

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
crates/oxc_formatter/tests/fixtures/js/jsx/ternary-with-comment.jsx Added two new test cases documenting the formatting behavior for JSX ternaries with comments in different positions
crates/oxc_formatter/tests/fixtures/js/jsx/ternary-with-comment.jsx.snap Updated snapshot to include expected formatting output for the new test cases at both 80 and 100 character print widths

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Nov 28, 2025
Copy link
Member

Dunqing commented Nov 28, 2025

Merge activity

Closes #16179

Bug itself was already fixed by #16224
@graphite-app graphite-app bot force-pushed the 11-28-test_formatter_add_tests_for_16179_and_16180 branch from 695d56c to f08411e Compare November 28, 2025 08:18
@graphite-app graphite-app bot merged commit f08411e into main Nov 28, 2025
18 checks passed
@graphite-app graphite-app bot deleted the 11-28-test_formatter_add_tests_for_16179_and_16180 branch November 28, 2025 08:23
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 28, 2025
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-formatter Area - Formatter 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.

formatter: difference with prettier with comment before ternary : operator in jsx

2 participants