
Verify Email Snapshots
Email templates break in subtle ways that unit tests miss. This uses Verify to snapshot the full rendered HTML of your email templates, so when something changes, you get a visual diff instead of a cryptic assertion failure. Works with MJML or any email renderer. You write a test that renders a template with sample variables, and Verify captures the HTML as a baseline. Next time it runs, any difference fails the build until you review and accept it. The real win is catching regressions during code review when someone tweaks a layout or variable substitution. Pair it with a diff tool or just open the HTML in a browser to see what actually changed.
- skills.sh installs
- 436
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add aaronontheweb/dotnet-skills --skill verify-email-snapshots --agent claude-codeInstalls into .claude/skills of the current project.
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 authoringaspire/mailpit-integration- Test email delivery locallytesting/snapshot-testing- General Verify patterns
Why Snapshot Test Emails?
Email templates are:
- Visual - Small changes can break rendering across clients
- Hard to unit test - Output is complex HTML, not simple values
- 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>();
Sponsors
Details
- Repository
- github.com/aaronontheweb/dotnet-skills
- Categories
- Frontend Development, Testing & QA, .NET & C#
- First seen
- Jun 3, 2026
More from aaronontheweb/dotnet-skills
All 34- Akka Hosting Actor Patterns434
- Akka Net Testing Patterns431
- OpenTelemetry NET Instrumentation431
- Akka Net Management430
- Akka Net Aspire Configuration415
- Marketplace Publishing408
- Modern Csharp Coding Standards2.3K
- Csharp Concurrency Patterns1.6K
- Efcore Patterns1.6K
- Dependency Injection Patterns703
- Database Performance700
- Dotnet Project Structure692
- Api Design690
- Type Design Performance684
- Ilspy Decompile640
- Package Management613
- Microsoft Extensions Configuration609
- Serialization596
- Crap Analysis581
- Dotnet Slopwatch580
- Testcontainers Integration Tests579
- Playwright Blazor Testing560
- Dotnet Local Tools550
- Aspire Integration Testing522