Skip to content
aaronontheweb avatar

Verify Email Snapshots

Snapshot tests that catch email template regressions by comparing rendered HTML against an approved baseline using Verify.

CCM score
67 of 100
skills.sh installs
464
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers snapshot testing of rendered email HTML, including review of diffs when templates change
  • Includes C# examples for basic template tests, per-variant test classes, scrubbing dynamic values, and composer output
  • Enforces a missing-baseline failure in CI via ThrowOnMissingVerifiedFile() to prevent accidental acceptance
  • Designed for .NET teams testing MJML templates, linked to the MJML authoring and Mailpit integration skills

Install

$ npx -y skills add aaronontheweb/dotnet-skills --skill verify-email-snapshots -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Snapshot Testing Email Templates with Verify

When to Use This Skill

Use this skill when:

  • Testing email template rendering for regressions
  • Validating MJML templates compile to expected HTML
  • Reviewing email changes in code review (diffs are visual)
  • Ensuring variable substitution works correctly

Related skills:

  • aspnetcore/mjml-email-templates - MJML template authoring
  • aspire/mailpit-integration - Test email delivery locally
  • testing/snapshot-testing - General Verify patterns

Why Snapshot Test Emails?

Email templates are:

  1. Visual - Small changes can break rendering across clients
  2. Hard to unit test - Output is complex HTML, not simple values
  3. Prone to regression - Template changes can have unintended effects

Snapshot testing captures the rendered HTML and fails when it changes unexpectedly.


Installation

dotnet add package Verify.Xunit  # or Verify.NUnit, Verify.MSTest

Basic Email Snapshot Test

[Fact]
public async Task UserSignupInvitation_RendersCorrectly()
{
    // Arrange
    var renderer = _services.GetRequiredService<IMjmlTemplateRenderer>();

Details

Repository
github.com/aaronontheweb/dotnet-skills
Categories
Testing & QA, .NET & C#
First seen
Jun 3, 2026

Questions

What does the verify-email-snapshots skill do?

It snapshot tests email templates using Verify, so rendered HTML is compared against an approved baseline and regressions are caught. It works with MJML templates and any email renderer. Failing tests show a diff that you can review before accepting the change.

Which skills are near verify-email-snapshots in the Testing and QA category?

Other skills in the Testing and QA category include tdd, migrate-to-shoehorn, test-driven-development, webapp-testing and break-ui. This skill is narrower, focused on snapshot testing rendered email HTML with Verify. It fits .NET projects that send templated emails.

How do I install verify-email-snapshots?

Run npx -y skills add aaronontheweb/dotnet-skills --skill verify-email-snapshots -y in your project. The skill needs the Verify.Xunit, Verify.NUnit or Verify.MSTest package added to a .NET project. Once installed, the agent can write and review HTML snapshot tests for your email templates.

Does verify-email-snapshots work with MJML email templates?

Yes, the skill covers MJML templates and shows tests that render them and compare the output to a verified HTML file. It also explains scrubbing dates, GUIDs and tokens so unstable values do not cause false failures. It is listed alongside the mjml-email-templates skill in the same repository.

More from aaronontheweb/dotnet-skills

All 34

Similar to Verify Email Snapshots

More Testing & QA