Skip to content

Docs/process: regenerate snapshots with a full vitest run -u after theme edits #74

Description

@IgorShevchik

Background

During the live nuxt/ui→b24ui sync ports (#72), regenerating snapshots with a targeted command like:

pnpm exec vitest run -u test/components/Select.spec.ts test/components/SelectMenu.spec.ts ...

intermittently did not update the first component(s) in the run — the test rendered against a stale compiled theme (#build/b24ui/*) and the snapshot wasn't refreshed. A subsequent full pnpm exec vitest run -u always fixed it. This caused a false "green" -u followed by a failing non--u verify.

Proposal — document the rule (and optionally harden)

After editing any src/theme/*.ts, regenerate snapshots with a full run, not a targeted one:

pnpm run dev:prepare
pnpm exec vitest run -u        # full suite
pnpm exec vitest run           # verify green (no -u)

Where to put it:

  • A note in the sync workflow guidance (.sync/PORTING.md reviewer/runbook section) and/or AGENTS.md "Key Conventions".
  • Optionally harden: vitest.config.ts with cache: false under CI=true, or a test:update script that always runs the full suite.

Priority: P3 (process/DX). Context: PR #72; same staleness hit ContextMenu and InputMenu during that PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions