-
Notifications
You must be signed in to change notification settings - Fork 664
test(rome_js_formatter): update prettier tests #2704
Conversation
Nice. What do you think of changing prettier's |
What is Rome's default behaviour for Hmm, |
Yes, by default
Yes. Rome and Prettier have different defaults |
That would be awesome if it's doable with a reasonable effort. I'm not familiar with how the test extraction works so I'm unable to assess the effort and maybe it's even best to tackle this in a separate PR. |
Interesting, I think that we can do it. We can try to re-run prettier with options before saving snapshot. |
@MichaReiser @ematipico |
There was a problem hiding this 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. I didn't review all snapshot changes but I love it that prettier's snapshots now matches Rome's options.
try { | ||
// We need to reformat prettier snapshot | ||
// because Rome and Prettier have different default options | ||
snapContent = prettier.format(snapContent, config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome. Something we wanted for a long time but no-one ever looked into it. Thank you so much for updating the tests with matching options.
Co-authored-by: Dominionys <6227442+Dominionys@users.noreply.github.com>
Summary
Update prettier tests and prettier version for a playground.
Prettier after 2.6.0 release treats comment different.
Input
2.6.0 Playground
Rome playground
Test Plan
???