Skip to content

docs(e2e): describe argv steps in the snapshot test README - #873

Open
Dunqing wants to merge 3 commits into
voidzero-dev:mainfrom
Dunqing:docs-e2e-snapshots-readme-steps
Open

Dunqing wants to merge 3 commits into
voidzero-dev:mainfrom
Dunqing:docs-e2e-snapshots-readme-steps

Conversation

@Dunqing

@Dunqing Dunqing commented Oct 22, 2026

Copy link
Copy Markdown
Member

Motivation

The e2e snapshot test README describes a step format the harness doesn't accept. It shows string steps such as "vp run build" and a table form with command, and says steps run through /bin/sh. Step in main.rs is an argv array or a table with argv. A string step makes the test binary panic while it loads the fixtures, before any case runs, and steps start without a shell in a cleared environment, so a fixture written from the README doesn't run.

Changes

  • Replace both examples with argv steps, and the shell pipe with vtt pipe-stdin.
  • Document the step keys (argv, cwd, comment, envs, interactions, formatted-snapshot), the case keys (name, steps, comment, cwd, cfg, ignore), how programs are found, the full write-key list, the step timeout, and how new snapshots are written as <name>.md.new and accepted with UPDATE_SNAPSHOTS=1.
  • Say the tests run vt, not vp, and correct the doc comment on a step's comment field: the snapshot shows it under the step's heading, not appended to the command line.

The examples were run through the harness as written.

The README showed string steps ("vp run build") and a table form with
`command`, and said steps run through /bin/sh. `Step` in main.rs is an
argv array or a table with `argv`, a string step makes the test binary
panic while loading fixtures, and steps start without a shell in a
cleared environment. Update the examples and notes to match: the table
and case keys, how `vt`/`vtt` are found, the full `write-key` list,
`vtt pipe-stdin` instead of shell pipes, the step timeout, and how new
snapshots are written and accepted.
The README said the tests execute `vp`; they run the `vt` binary built
for the test. The `comment` field of a step was documented as appended
to the command line, but the snapshot shows it under the step heading.
@Dunqing
Dunqing requested a review from wan9chi October 22, 2026 06:43

This branch has not been deployed

No deployments
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.

2 participants