Skip to main content
net10.0net11.0

YAML snapshots and inline YAML assertions for Nullean.Snapshots: stored verbatim, compared as trees with the YAML 1.2 core schema, differences pointing at line and column.

Published
Nov 14, 2026
9d ago
Total Downloads
4.8K
4,847

Install

dotnet add package Nullean.Snapshots.Yaml --version 0.12.2
ProductVersions
.NET
net10.0net11.0

README

Nullean.Snapshots.Yaml

snapshots.

YAML snapshots and inline YAML assertions for Nullean.Snapshots: stored as written, comments and layout kept, compared as trees with the YAML 1.2 core schema, differences pointing at line and column.

NuGet

Install

dotnet add package Nullean.Snapshots.Yaml

Quick start

using AwesomeAssertions;
using Nullean.Snapshots.Trees;
using Nullean.Snapshots.Yaml;

public class ManifestTests
{
	[Test]
	public void Renders() =>
		Manifest.Render().Should().MatchYamlSnapshot();      // .verified.yml, stored as written

	[Test]
	public void IgnoresVersion() =>
		Manifest.Render().Should().MatchYamlSnapshot(
			new TreeDiffOptions { IgnorePaths = ["$.metadata.resourceVersion"] });

	[Test]
	public void Inline() =>
		Manifest.Render().Should().BeYaml("items: [{id: 1}]");
}
  • Anchors and merge keys are resolved before comparing; MapOrder.Significant makes key order count.
  • Use the text MatchSnapshot instead when formatting or comments are what you are testing.

Learn more

Changes from Previous Version

v0.12.1v0.12.2
Added Frameworks
net11.0
Added Dependencies

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.