deps(nuget): update dependency snapshotassertions.tunit to 0.4.0#33
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
cc1aa0d to
978c9b0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.3.0→0.4.0Release Notes
JohnVerheij/SnapshotAssertions.TUnit (SnapshotAssertions.TUnit)
v0.4.0Additive release. No breaking changes; baselines that opted into
Scrubbers.Defaultproduce byte-identical output.Added
Scrubbers.GuidN: scrubs 32-character GUID-N format strings (theGuid.ToString("N")shape) into<guid:N>tokens. Shares the"guid"kind name withScrubbers.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 themssuffix.Scrubbers.Common: curated chain ofGuid+GuidN+Iso8601Timestamp+UnixEpochMillis+ElapsedMs. Superset ofScrubbers.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 returnsDiffSuggestionentries 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 byDiffSuggestionAnalyzer.SnapshotResult.Describe()/WriteDescriptionsmart-diff suggestion section: onMismatchedoutcomes 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 atScrubbers.Common. Failure messages forMismatchedoutcomes 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 newMatchesSnapshot<T>overloads. Carries the same chain methods asSnapshotAssertion(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
TUnitpackage reference bumped1.44.0→1.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.GitHubbumped10.0.203→10.0.300. The embedded source-link metadata in shipped.pdbfiles now points at the updated SourceLink schema; debugging-into-the-package from consumers' IDEs is unaffected in behaviour but uses the newer SourceLink format.Scrubbers.Commonordering rationale, smart-diff suggestion output shape and top-3 cap, the renderer-pattern API with four worked subclass examples (OtelTraceIdScrubber,EphemeralPathScrubber,PortScrubber,NumericTokenScrubberas a parameterised variant), and sibling-family composition without cross-package dependency.src/SnapshotAssertions.TUnit/README.md,src/SnapshotAssertions/README.md) mentionScrubbers.Common, smart-diff suggestions, and the renderer-pattern API with deep-links to the root README.Configuration
📅 Schedule: (in timezone Europe/Amsterdam)
🚦 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.
This PR was generated by Mend Renovate. View the repository job log.