Skip to content
Riot Docs

Search is only available in production builds. Try building and previewing the site to test it out locally.

Install Riot GitHub

riot snapshots

Riot’s current snapshot-management command is riot snapshots, not riot snapshot.

It exists because snapshot testing is not complete without an explicit review workflow.

Terminal window
riot snapshots review
riot snapshots approve
riot snapshots reject

They operate on pending *.expected.new files.

Use review when you want an interactive pass through the pending diffs:

Terminal window
riot snapshots review

The command:

  • discovers pending snapshots under the workspace
  • skips irrelevant directories like _build and .git
  • shows a diff against the approved file when one exists
  • lets you approve, reject, ignore, or quit

This is the right mode when the change needs a human decision.

Use approve when you already know the pending snapshots are correct:

Terminal window
riot snapshots approve

Approval promotes the .expected.new file into the approved .expected file.

Use reject when the pending candidates are wrong or obsolete:

Terminal window
riot snapshots reject

Rejecting removes the pending candidates without touching the approved snapshots.

The snapshot commands accept an optional substring query so you can narrow the review set:

Terminal window
riot snapshots review parser
riot snapshots approve archive

That matters once the workspace has more than a handful of pending artifacts.

Riot treats .expected.new files as visible review artifacts, not as hidden scratch output.

That is the right tradeoff:

  • approved files stay stable
  • pending changes are explicit
  • review is intentional instead of accidental