test(oxfmt): Add snapshot for invalid file error reports#19802
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
This pull request adds snapshot tests for CLI error reporting when processing files with invalid syntax. The tests verify that the oxfmt CLI tool correctly reports syntax errors for both JavaScript and YAML files with parse errors.
Changes:
- Added test suite for error reporting with invalid file syntax
- Added fixture files with intentionally invalid JavaScript and YAML syntax
- Added snapshot capturing expected error output format
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| apps/oxfmt/test/cli/error_reports/error_reports.test.ts | New test suite verifying CLI error reporting for invalid files |
| apps/oxfmt/test/cli/error_reports/fixtures/invalid.js | Fixture with invalid JavaScript syntax (incomplete class declaration) |
| apps/oxfmt/test/cli/error_reports/fixtures/invalid.yaml | Fixture with invalid YAML syntax (nested mappings in compact form) |
| apps/oxfmt/test/cli/error_reports/snapshots/error_reports.test.ts.snap | Snapshot capturing expected error messages and exit code |
Merge activity
|
51a17c1 to
b94caf8
Compare
aa98e9f to
70943d7
Compare
Just adding tests for sure. ..., but to do so, we need to force dumb theme for `miette`.
70943d7 to
e7572aa
Compare

Just adding tests for sure.
..., but to do so, we need to force dumb theme for
miette.