La interfaz está localizada; las descripciones y documentos de las Skills se traducen automáticamente con IA a su idioma. El código, los comandos, rutas y términos técnicos se mantienen en el original, y prevalece el documento del autor.
Explorar Skills
Desarrollo · SKILL.md

dotnet-verify

dotnet-verify

This skill should be used when working with Verify snapshot tests in .NET projects. Use when updating verified snapshots after intentional code changes, accepting new snapshots, discovering verify tests, or troubleshooting snapshot mismatches. Trigger phrases include "verify tests", "update snapshots", "accept snapshots", "verified files", ".verified.txt".

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentación de la Skill

GitHub

name: dotnet-verify description: This skill should be used when working with Verify snapshot tests in .NET projects. Use when updating verified snapshots after intentional code changes, accepting new snapshots, discovering verify tests, or troubleshooting snapshot mismatches. Trigger phrases include "verify tests", "update snapshots", "accept snapshots", "verified files", ".verified.txt".

.NET Verify Snapshot Testing

Manage Verify snapshot tests using the verify.tool dotnet local tool.

Discovery

To list all test files using Verify snapshots:

rg -l "Verifier\.Verify|UsesVerify|\.verified\." --type cs

To scope to a specific directory:

rg -l "Verifier\.Verify|UsesVerify|\.verified\." --type cs <path/to/test/directory>

Update Snapshots

To update snapshots after intentional code changes:

  1. Build the solution:

    dotnet build -p:WarningLevel=0 /clp:ErrorsOnly --verbosity minimal
    
  2. Run affected verify tests (they fail, generating .received. files):

    dotnet test <test-project> --no-build --filter "FullyQualifiedName~<TestClass>" -v m
    
  3. Accept all new snapshots:

    dotnet verify accept -y
    

    To scope to a specific directory:

    dotnet verify accept -y -w <path/to/test/directory>
    
  4. Re-run tests to confirm they pass:

    dotnet test <test-project> --no-build --filter "FullyQualifiedName~<TestClass>" -v m
    

File Conventions

  • ClassName.MethodName.verified.txt — accepted snapshot (committed to git)
  • ClassName.MethodName.received.txt — latest test output (not committed, gitignored)
  • Parameterized tests: ClassName.MethodName_param=value.verified.txt

Quick Reference

CommandPurpose
dotnet verify accept -yAccept all pending snapshots
dotnet verify accept -y -w <dir>Accept snapshots in specific directory
rg -l "Verifier\.Verify|UsesVerify|\.verified\." --type csList all test files using Verify
Skills guardadas