-
Notifications
You must be signed in to change notification settings - Fork 653
test(rome_formatter_test): JSON Prettier Tests #2568 #3913
Conversation
✅ Deploy Preview for docs-rometools canceled.Built without sensitive environment variables
|
..._formatter/tests/specs/prettier/typescript/angular-component-examples/test.component.ts.snap
Show resolved
Hide resolved
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.
Awesome work. I've one proposal how it may be possible to reduce some of the traits (but you'll know better if it's a good idea) and left a few questions.
..._formatter/tests/specs/prettier/typescript/angular-component-examples/test.component.ts.snap
Show resolved
Hide resolved
crates/rome_json_formatter/tests/specs/prettier/prepare_tests.js
Outdated
Show resolved
Hide resolved
@leops is a test crate idiomatic Rust to share test code? |
Well using a crate is pretty much the only way to efficiently share code, plus we already have the |
7e20c36
to
0dcd37b
Compare
0dcd37b
to
7453528
Compare
} | ||
} | ||
|
||
fn is_ignored(file_name: &str) -> bool { |
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.
Nit: It would be nice if the ignored
are handled per language. But let's leave this for another PR
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.
Nice work! I think we're good to go after you remove the prettier
argument from the prepareTests
function
Summary
Initial PR which implements testing for
rome_json_formatter
:check_reformat
logic.prettier_tests
logic.TODO:
spec_test
logic.prepare_test
logic.Open questions:
Do we need to merge prettier compatibility reports from js and json crates?
Test Plan
cargo test -p rome_js_formatter && cargo test -p rome_json_formatter