Skip to content

test(oxfmt): Add snapshot for invalid file error reports#19802

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-27-test_oxfmt_add_snapshot_for_invalid_file_error_reports
Feb 27, 2026
Merged

test(oxfmt): Add snapshot for invalid file error reports#19802
graphite-app[bot] merged 1 commit intomainfrom
02-27-test_oxfmt_add_snapshot_for_invalid_file_error_reports

Conversation

@leaysgur
Copy link
Member

@leaysgur leaysgur commented Feb 27, 2026

Just adding tests for sure.

..., but to do so, we need to force dumb theme for miette.

Copilot AI review requested due to automatic review settings February 27, 2026 02:54
@github-actions github-actions bot added A-cli Area - CLI A-formatter Area - Formatter labels Feb 27, 2026
Copy link
Member Author

leaysgur commented Feb 27, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added the C-test Category - Testing. Code is missing test cases, or a PR is adding them label Feb 27, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@leaysgur leaysgur added the 0-merge Merge with Graphite Merge Queue label Feb 27, 2026
Copy link
Member Author

leaysgur commented Feb 27, 2026

Merge activity

  • Feb 27, 2:59 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 27, 4:39 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 27, 4:39 AM UTC: leaysgur added this pull request to the Graphite merge queue.
  • Feb 27, 4:46 AM UTC: Merged by the Graphite merge queue.

@leaysgur leaysgur force-pushed the 02-27-test_oxfmt_add_snapshot_for_invalid_file_error_reports branch 4 times, most recently from 51a17c1 to b94caf8 Compare February 27, 2026 03:41
@leaysgur leaysgur force-pushed the 02-27-test_oxfmt_add_snapshot_for_invalid_file_error_reports branch 3 times, most recently from aa98e9f to 70943d7 Compare February 27, 2026 04:33
@leaysgur leaysgur removed the 0-merge Merge with Graphite Merge Queue label Feb 27, 2026
Just adding tests for sure.

..., but to do so, we need to force dumb theme for `miette`.
@graphite-app graphite-app bot force-pushed the 02-27-test_oxfmt_add_snapshot_for_invalid_file_error_reports branch from 70943d7 to e7572aa Compare February 27, 2026 04:40
@graphite-app graphite-app bot merged commit e7572aa into main Feb 27, 2026
19 checks passed
@graphite-app graphite-app bot deleted the 02-27-test_oxfmt_add_snapshot_for_invalid_file_error_reports branch February 27, 2026 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-formatter Area - Formatter C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants