Skip to content

✨ feat(mq-test): add snapshot testing via assert_snapshot - #2193

Merged
harehare merged 2 commits into
mainfrom
feat/mq-test-snapshot-testing
Aug 13, 2026
Merged

✨ feat(mq-test): add snapshot testing via assert_snapshot#2193
harehare merged 2 commits into
mainfrom
feat/mq-test-snapshot-testing

Conversation

@harehare

Copy link
Copy Markdown
Owner

Summary

Adds golden-file snapshot testing to mq-test, modeled on typst's suite/ref/store split. assert_snapshot(name, actual) is a new mq-test-only builtin that compares actual output against a checked-in __snapshots__/<file>/<name>.snap, and on mismatch writes the actual output plus a self-contained HTML diff report to .mq-test-store/ for review. --update-snapshots creates or overwrites goldens from the current output.

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • ♻️ Refactor
  • 📝 Documentation
  • ⚡ Performance
  • ✅ Test
  • 📦 Build / dependencies
  • 👷 CI

Checklist

  • I ran cargo fmt and cargo clippy and addressed any warnings
  • I ran just test-all and all tests pass
  • I added or updated tests covering this change
  • I updated relevant documentation (/docs, crate README.md) if needed
  • I added a changelog entry if this is a user-facing change

Additional Context

Adds golden-file snapshot testing to mq-test, modeled on typst's
suite/ref/store split. `assert_snapshot(name, actual)` is a new
mq-test-only builtin that compares actual output against a checked-in
`__snapshots__/<file>/<name>.snap`, and on mismatch writes the actual
output plus a self-contained HTML diff report to `.mq-test-store/`
for review. `--update-snapshots` creates or overwrites goldens from
the current output.
@codspeed-hq

codspeed-hq Bot commented Aug 13, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing feat/mq-test-snapshot-testing (311462e) with main (b51d52d)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (a3b4e22) during the generation of this report, so b51d52d was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@harehare
harehare force-pushed the feat/mq-test-snapshot-testing branch from 7836ff7 to 311462e Compare August 13, 2026 13:01
@harehare
harehare merged commit dccaf63 into main Aug 13, 2026
12 checks passed
@harehare
harehare deleted the feat/mq-test-snapshot-testing branch August 13, 2026 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant