Skip to main content

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.

Total Downloads
4.8K
4,847
Published
Nov 17, 2026
6d ago

Get Started

dotnet add package Nullean.Snapshots.Yaml --version 0.18.0
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

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

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.