tools icon indicating copy to clipboard operation
tools copied to clipboard

Multi-Lang Formatter: Benchmark and Testing

Open MichaReiser opened this issue 3 years ago • 4 comments

Goal

Set up benchmarking and the test infra for the JSON formatter

Tasks

  • [x] Add Prettier's JSON spec tests and run them as part of the test suite #3913
  • [x] Find representative JSON files and run them as part ofbench_formatter #3845
  • [ ] Add support for creating JSON formatter spec tests

Dependencies

  • [x] #2567

MichaReiser avatar May 10 '22 06:05 MichaReiser

@leops how did you add the Prettier tests? Do you have that script still somewhere with some instructions on how to run it?

MichaReiser avatar May 10 '22 07:05 MichaReiser

@leops how did you add the Prettier tests? Do you have that script still somewhere with some instructions on how to run it?

The script I used is committed to the repo in crates/rome_js_formatter/tests/specs/prettier/prepare_tests.js. It's really basic, all it does is look for certain patterns of Jest snapshots and extract them into individual files, but it should be possible to extend it from there

leops avatar May 10 '22 07:05 leops

This issue is stale because it has been open 14 days with no activity.

github-actions[bot] avatar Sep 22 '22 12:09 github-actions[bot]

This issue is stale because it has been open 14 days with no activity.

github-actions[bot] avatar Nov 14 '22 12:11 github-actions[bot]