-
Notifications
You must be signed in to change notification settings - Fork 659
test(rome_js_formatter): Add prettier's JSX tests #3255
Conversation
This PR extracts the JSX tests from prettier and updates existing tests. There are a few instability issues, most related to comments. I'll look into those as part of the comments refactoring
This PR extracts the JSX tests from prettier and updates existing tests. There are a few instability issues, most related to comments. I'll look into those as part of the comments refactoring
✅ Deploy Preview for rometools canceled.
|
I'll handle the comments issue as part of the #3227 |
What's the compatibility coverage now? |
I added them to the test plan. They aren't changing much (and I prefer to fix any regressions as part of dedicated PRs) |
@@ -0,0 +1,6 @@ | |||
// https://github.com/typescript-eslint/typescript-eslint/pull/4382 | |||
function decorator() {} |
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.
I don't remember what we do with skipped/unsupported syntax. Do we include them in the test suite?
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.
They are included but "excluded" in the report by testing on the test file name. We don't ignore decorator tests for now
@@ -0,0 +1,18 @@ | |||
<style jsx>{` |
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.
What should we do with this test? It would tarnish our coverage, we don't support framework/library specific formatting
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.
We keep them for now. We only excluded tests where the parser fails to parse the syntax (because it's unlikely that the formatter can then produce any reasonable result)
Summary
This PR extracts the JSX tests from prettier and updates existing tests.
There are a few instability issues, most related to comments. I'll look into those as part of the comments refactoring
Test Plan
Verified that the new snapshots run as part of
cargo test
Average compatibility: 86.15 -> 86.16
Compatible lines: 84.93 -> 84.99