Skip to content

Comments

test(formatter): correct singleQuote test#17837

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-09-test_formatter_correct_signlequote_test
Jan 12, 2026
Merged

test(formatter): correct singleQuote test#17837
graphite-app[bot] merged 1 commit intomainfrom
01-09-test_formatter_correct_signlequote_test

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Jan 9, 2026

singleQuote defaults to false, the test below already had a default singleQuote test, so change this test to test singleQuote: true

@github-actions github-actions bot added A-cli Area - CLI A-formatter Area - Formatter C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Jan 9, 2026
Copy link
Member Author

Dunqing commented Jan 9, 2026


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.

@Dunqing Dunqing changed the title test(formatter): correct signleQuote test test(formatter): correct singleQuote test Jan 9, 2026
@Dunqing Dunqing marked this pull request as ready for review January 11, 2026 14:08
Copilot AI review requested due to automatic review settings January 11, 2026 14:08
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 corrects a test for the singleQuote formatter option. The test was incorrectly labeled and configured as testing singleQuote: false when a separate test already covers the default behavior (which is false). The PR updates both the test name and configuration to test singleQuote: true instead.

Changes:

  • Updated test name from "should keep quotes with singleQuote: false" to "should keep quotes with singleQuote: true"
  • Changed the singleQuote option value from false to true in the test configuration
Comments suppressed due to low confidence (1)

apps/oxfmt/test/tailwindcss/tailwindcss.test.ts:1071

  • The expected output snapshot appears to be incorrect for singleQuote: true. When singleQuote is set to true, the formatter should convert double quotes to single quotes in JavaScript/JSX code (for the outer quotes, not the quotes inside Tailwind class strings). However, the expected output here is identical to the default singleQuote test on lines 1086-1090. The expected output should likely show single quotes being preferred for the outer JavaScript code where applicable.
    expect(result.code).toMatchInlineSnapshot(`
      "<div className={clsx('text-md before:content-["hello"]')}>Hello</div>;
      <div className={clsx("text-md before:content-['hello']")}>Hello</div>;
      "
    `);

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

@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 12, 2026

Merge activity

`singleQuote` defaults to `false`, the test below already had a default `singleQuote` test, so change this test to test `singleQuote: true`
@graphite-app graphite-app bot force-pushed the 01-09-test_formatter_correct_signlequote_test branch from 6b35ed0 to 14fe544 Compare January 12, 2026 02:25
@graphite-app graphite-app bot merged commit 14fe544 into main Jan 12, 2026
18 checks passed
@graphite-app graphite-app bot deleted the 01-09-test_formatter_correct_signlequote_test branch January 12, 2026 02:32
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI 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.

1 participant