snapshot-test-v2

Generate snapshot tests with Verify (.NET) or Jest snapshots

SKILL.md

GitHub

Snapshot Testing

Generate snapshot tests for API responses and component rendering.

For .NET (Verify)

dotnet add package Verify.Xunit
[Fact]
public Task GetCandidate_ReturnsExpectedShape()
{
    var result = service.GetById("test-id");
    return Verify(result);
}

For React (Jest)

test('CandidateCard renders correctly', () => {
  const { container } = render(<CandidateCard candidate={mockCandidate} />);
  expect(container).toMatchSnapshot();
});

Arguments

  • <target>: Class or component to snapshot
  • --framework=<verify|jest>: Testing framework