Files
oxc-project__oxc/crates/oxc_formatter_json/tests/mod.rs
leaysgur e4a89ec5fe refactor(formatter): Share fixtures test harness and test formatter_json (#22676)
Extract the fixture-based snapshot test harness from `oxc_formatter` into two `oxc_formatter_core` modules behind a `test_harness` feature:

- `test_support/codegen`:
  - Language-agnostic `build.rs` helper that walks `tests/fixtures/` and emits `#[test]` functions to `$OUT_DIR`
  - Extension allowlist is now a parameter instead of hardcoded JS types.
- `test_support/harness`:
  - Snapshot-runtime that drives one format pass per option set × per printWidth (80, 100) and asserts via `insta`
  - Per-language hook is the new `FixtureFormatter` trait
2026-05-29 00:49:50 +00:00

2 lines
14 B
Rust