Skip to content

Conversation

@motlin
Copy link
Contributor

@motlin motlin commented Jul 3, 2025

Before this change, checking out the project and running update-test-outputs would make changes to the test outputs.

❯ npm run build && npm run update-test-outputs
❯ git status
HEAD detached at upstream/main
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   packages/prettier-plugin-java/test/unit-test/binary_expressions/operator-position-start/_output.java
        modified:   packages/prettier-plugin-java/test/unit-test/require-pragma/invalid-pragma/_output.java

no changes added to commit (use "git add" and/or "git commit -a")

The change here is to use the test-specific configuration while recording tests. With this change, running npm run update-test-outputs doesn't make any changes to any files.

Copy link
Contributor

@jtkiesel jtkiesel left a comment

Choose a reason for hiding this comment

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

Thank you for this contribution! It will certainly make testing the printer much easier during development. I added a couple suggestions for minor improvements, let me know what you think.

@motlin motlin force-pushed the update-test-outputs branch from c3660c5 to 86c10f7 Compare July 6, 2025 03:53
@motlin
Copy link
Contributor Author

motlin commented Jul 6, 2025

Thanks for the feedback. I think I addressed your points by renaming the files to .prettierrc.json and by removing the prettierOptions parameter in favor of always loading .prettierrc.json instead.

Copy link
Contributor

@jtkiesel jtkiesel left a comment

Choose a reason for hiding this comment

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

Thank you for the quick changes and the rebase! It looks great. 👍

@jtkiesel jtkiesel merged commit a90cfa3 into jhipster:main Jul 6, 2025
6 checks passed
@motlin motlin deleted the update-test-outputs branch July 6, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants