Skip to content

refactor: Use custom Verify logic - #1931

Open
linkdotnet wants to merge 1 commit into
mainfrom
refactor/custom-verify
Open

linkdotnet wants to merge 1 commit into
mainfrom
refactor/custom-verify

Conversation

@linkdotnet

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI lite review requested due to automatic review settings September 16, 2026 19:59
@linkdotnet

Copy link
Copy Markdown
Collaborator Author

This superseeds #1927 given that Verify.XunitV3 now needs SponsorCheck - we might come around as open source ourselves, but we used it in only one place and one place only.

We can get exempt, see: https://github.com/VerifyTests/Verify/blob/main/docs/maintenance-fee.md#exempt

@egil I am fine with both ways, leaning towards removing the dependency

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Generator diagnostics and concurrent snapshot updates are not fully handled.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Refactors generator snapshot verification to use local .verified.cs comparisons instead of Verify.

Changes:

  • Adds custom snapshot comparison and update logic.
  • Removes Verify initialization and package dependencies.
  • Excludes snapshot files from compilation.
File summaries
File Changes Review findings
tests/bunit.generators.tests/Web.AngleSharp/WrapperElementsGeneratorTest.cs Implements custom snapshot verification. Moderate (2 votes): Assert run.Diagnostics is empty. Critical (1 vote): Serialize or atomically update snapshots to prevent parallel-write races.
tests/bunit.generators.tests/VerifyInitializer.cs Removes obsolete Verify initialization. None
tests/bunit.generators.tests/bunit.generators.tests.csproj Configures snapshot files and removes Verify references. None
Directory.Packages.props Removes obsolete Verify package versions. None
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

if (existing == actual)
continue;

File.WriteAllText(path, actual, new UTF8Encoding(encoderShouldEmitUTF8Identifier: true));
Comment on lines +25 to +27
Assert.Empty(result.Diagnostics);
var run = Assert.Single(result.Results);
Assert.Null(run.Exception);
@linkdotnet
linkdotnet force-pushed the refactor/custom-verify branch from c950fa4 to f55e648 Compare September 16, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants