Skip to content

deps(nuget): update dependency snapshotassertions.tunit to 0.4.0#33

Merged
renovate[bot] merged 1 commit into
mainfrom
renovate/snapshotassertions.tunit-0.x
May 21, 2026
Merged

deps(nuget): update dependency snapshotassertions.tunit to 0.4.0#33
renovate[bot] merged 1 commit into
mainfrom
renovate/snapshotassertions.tunit-0.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 21, 2026

This PR contains the following updates:

Package Change Age Confidence
SnapshotAssertions.TUnit 0.3.00.4.0 age confidence

Release Notes

JohnVerheij/SnapshotAssertions.TUnit (SnapshotAssertions.TUnit)

v0.4.0

Additive release. No breaking changes; baselines that opted into Scrubbers.Default produce byte-identical output.

Added
  • Scrubbers.GuidN: scrubs 32-character GUID-N format strings (the Guid.ToString("N") shape) into <guid:N> tokens. Shares the "guid" kind name with Scrubbers.Guid, so the index counter is unified across both formats; the Nth GUID occurrence in a snapshot gets the same N regardless of which format produced it.
  • Scrubbers.ElapsedMs: scrubs elapsed-millisecond values (42ms, 42.5ms, 1234.567 ms) into <elapsed-ms:N> tokens. Case-sensitive on the ms suffix.
  • Scrubbers.Common: curated chain of Guid + GuidN + Iso8601Timestamp + UnixEpochMillis + ElapsedMs. Superset of Scrubbers.Default; opt-in for the extended pattern set. Ordering follows the most-specific-first rule to avoid double-scrubbing.
  • DiffSuggestionAnalyzer.Analyze(string diff): scans a snapshot-mismatch diff for known volatile patterns and returns DiffSuggestion entries recommending applicable built-in scrubbers, ordered by hit count descending with stable secondary ordering by declaration order. Counts matches only on lines that begin with + or -; context lines are skipped so patterns unchanged on both sides do not surface as suggestions.
  • DiffSuggestion(string PatternName, int Count, string Recommendation) record: one scrubber recommendation surfaced by DiffSuggestionAnalyzer.
  • SnapshotResult.Describe() / WriteDescription smart-diff suggestion section: on Mismatched outcomes with detected patterns, the failure message now includes a "Suggestion(s)" section between the diff and the accept-flow guidance. The list is capped at the top 3 patterns by hit count; surplus patterns roll up into an "... and N more" line pointing consumers at Scrubbers.Common. Failure messages for Mismatched outcomes with no detected patterns, and for all other outcomes (Matched, NoBaseline, Accepted), are byte-identical to v0.3.0.
  • SnapshotAssertions.Render.SnapshotRenderer<T> abstract base class: consumers subclass to plug domain types (Google.Protobuf messages, XDocument, Activity, project-specific value objects) into the snapshot pipeline.
  • SnapshotAssertions.Render.Renderer.For<T>(Func<T, string>) static factory: builds a renderer from a lambda when a full subclass is unnecessary.
  • RenderedSnapshotAssertion<T>: renderer-projected assertion type returned by the two new MatchesSnapshot<T> overloads. Carries the same chain methods as SnapshotAssertion (WithName, AtPath, WithOptions, WithScrubber).
  • MatchesSnapshot<T>(this IAssertionSource<T>, SnapshotRenderer<T>) extension: renderer-projected entry point taking a subclass renderer. Use when the renderer is reusable and owns configuration or state.
  • MatchesSnapshot<T>(this IAssertionSource<T>, Func<T, string>) extension: delegate-shaped entry point. Use for inline projections and for composing with a sibling family package's static renderer method without taking a reference on its assembly.
Changed
  • TUnit package reference bumped 1.44.01.44.39 (and the external-consumer smoke-test pin). 1.44.39 carries the [GenerateAssertion] source-generator fix for value-type optional parameters; no behavioural change for this package, taken for family lockstep.
  • Microsoft.SourceLink.GitHub bumped 10.0.20310.0.300. The embedded source-link metadata in shipped .pdb files now points at the updated SourceLink schema; debugging-into-the-package from consumers' IDEs is unaffected in behaviour but uses the newer SourceLink format.
  • README cookbook documents Scrubbers.Common ordering rationale, smart-diff suggestion output shape and top-3 cap, the renderer-pattern API with four worked subclass examples (OtelTraceIdScrubber, EphemeralPathScrubber, PortScrubber, NumericTokenScrubber as a parameterised variant), and sibling-family composition without cross-package dependency.
  • Packaged READMEs (src/SnapshotAssertions.TUnit/README.md, src/SnapshotAssertions/README.md) mention Scrubbers.Common, smart-diff suggestions, and the renderer-pattern API with deep-links to the root README.

Configuration

📅 Schedule: (in timezone Europe/Amsterdam)

  • Branch creation
    • "before 4am"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot requested a review from JohnVerheij as a code owner May 21, 2026 07:22
@renovate renovate Bot added the dependencies Pull requests that update a dependency file label May 21, 2026
@renovate renovate Bot enabled auto-merge (squash) May 21, 2026 07:22
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@JohnVerheij JohnVerheij force-pushed the renovate/snapshotassertions.tunit-0.x branch from cc1aa0d to 978c9b0 Compare May 21, 2026 15:08
@renovate renovate Bot merged commit 03c9f5c into main May 21, 2026
4 checks passed
@renovate renovate Bot deleted the renovate/snapshotassertions.tunit-0.x branch May 21, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants