Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(test): better infra for formatting #2189

Merged
merged 4 commits into from
Mar 25, 2024

Conversation

ematipico
Copy link
Member

@ematipico ematipico commented Mar 25, 2024

Summary

This PR refactors the testing infrastructure of the formatter.

The infrastructure now uses the actual biome.json configuration, so we don't need to create an additional type to map the options. It was very inconvenient.

On the other hand, we can't group cases anymore, so I had to breakdown those tests by creating new folders, copying the files and setting the correct configuration.

Plus, I added a new CONTRIBUTING.md file that explains how to set up the infrastructure of a new formatter.

Test Plan

CI should pass.

Proofread the guide. https://github.com/biomejs/biome/blob/chore/better-formatter-testing/crates/biome_formatter/CONTRIBUTING.md

@ematipico ematipico requested review from a team March 25, 2024 10:49
@github-actions github-actions bot added A-Project Area: project A-Formatter Area: formatter L-JavaScript Language: JavaScript and super languages L-CSS Language: CSS L-JSON Language: JSON and super languages labels Mar 25, 2024
Copy link

netlify bot commented Mar 25, 2024

Deploy Preview for biomejs failed.

Name Link
🔨 Latest commit 68b24c3
🔍 Latest deploy log https://app.netlify.com/sites/biomejs/deploys/6601b6740804960008b408c8

Copy link

codspeed-hq bot commented Mar 25, 2024

CodSpeed Performance Report

Merging #2189 will improve performances by 13.95%

Comparing chore/better-formatter-testing (68b24c3) with main (35ba975)

Summary

⚡ 1 improvements
✅ 92 untouched benchmarks

Benchmarks breakdown

Benchmark main chore/better-formatter-testing Change
eucjp.json[cached] 4.6 ms 4.1 ms +13.95%

Co-authored-by: Superchupu <53496941+SuperchupuDev@users.noreply.github.com>
@ematipico ematipico merged commit 3a1849a into main Mar 25, 2024
11 checks passed
@ematipico ematipico deleted the chore/better-formatter-testing branch March 25, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter A-Project Area: project L-CSS Language: CSS L-JavaScript Language: JavaScript and super languages L-JSON Language: JSON and super languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants