VerifyTests / Verify

Verify is a snapshot testing tool that simplifies the assertion of complex data models and documents.
MIT License
2.85k stars 145 forks source link

Convention VerifyChecks per project instead of solution #1313

Open jerone opened 1 month ago

jerone commented 1 month ago

Is the feature request related to a problem

When running await VerifyChecks.Run();, it will throw out the following exception:

VerifyCheckException
Expected .gitIgnore to contain settings for Verify.
Path: file:///C:/Sources/<project>/.gitIgnore
Recommended settings:

# Verify
*.received.*
*.received/

I noticed that the convention VerifyChecks are run on the solution, instead of the corresponding test project.

It is not always possible to alter/create solution files. In my case it was the .gitignore file.

To comply to the Source Control Includes/Excludes convention, I created a .gitignore file in the test project. This works perfectly, as I only intent to have Verify run in this test project. It does however throw above exception when running the VerifyChecks :(

Describe the solution

I hope the convention checks could be run both on the project and then on the solution.

Describe alternatives considered

-

Additional context

This is related to the EditorConfig & GitAttributes conventions checks too, as all of them are inherited files.

Note that the docs never say to apply the conventions to the solution, instead of the test project.

SimonCropp commented 1 month ago

happy to consider a pull request that fixes this