Skip to content

Snapshot-testing guide instructs cargo test after declaring nextest canonical #508

Description

@leynos

Problem

docs/snapshot-testing-in-netsuke-using-insta.md declares cargo-nextest the canonical runner in the callout at lines 280–285, but the procedural instructions further down still tell the reader to run cargo test:

  • Line 287: "To execute the snapshot tests, run cargo test."
  • Line 331: "Once accepted, re-run cargo test — it should pass…"

The callout tries to cover this by saying "The cargo test invocations below are the generic form", but a reader following the procedure top to bottom runs a different runner from CI. That matters here rather than being cosmetic: nextest runs each test in its own process, so process-isolation differences — shared state between snapshot tests, environment mutation, ordering effects — can pass locally under cargo test and fail in CI, or the reverse.

Suggested resolution

Either:

  1. Replace the two invocations with the canonical flow — cargo insta test --test-runner nextest, and cargo insta review where changes are accepted; or
  2. Label them explicitly as a non-canonical fallback at each site, rather than only in the callout above them.

Option 1 is preferable: the callout already establishes the canonical commands, so the procedure repeating a different one is the inconsistency.

Scope note

This was raised by CodeRabbit during review of #500 (locale expansion, issue #466). It is unrelated to that PR's subject — #500 touched this file only through incidental Markdown reflow, which has since been reverted, so the file is now identical to main. Filing separately rather than widening #500.

Triage: [type:docstyle]

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationmediumRoadmap items to schedule within the current quarter. Clear scope, normal review cycles.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions