test(formatter): Add tests for #16179 and #16180#16231
test(formatter): Add tests for #16179 and #16180#16231graphite-app[bot] merged 1 commit intomainfrom
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
There was a problem hiding this comment.
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.
Merge activity
|
695d56c to
f08411e
Compare
oxc-project#16231) Closes oxc-project#16179 Bug itself was already fixed by oxc-project#16224

Closes #16179
Bug itself was already fixed by #16224