Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add api verify #5696

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add api verify #5696

wants to merge 1 commit into from

Conversation

SimonCropp
Copy link
Contributor

@SimonCropp SimonCropp commented Aug 16, 2024

This adds snapshot testing to the repo using Verify

As an initial example i added a test for the API. This means any time the public API changes you need to accept that change. this secondary (in addition to the code that changes the api) acceptance serves as a confirmation of any change and the api change to be visualized in different way

to accept any change there are a variety of approaches https://github.com/VerifyTests/Verify?tab=readme-ov-file#snapshot-management

if u want to see the workflow for managing snapshots:

if u want to see some more content on how verify works https://github.com/VerifyTests/Verify?tab=readme-ov-file#media

let me know if u want to jump on a call to discuss any of the above

@stsrki
Copy link
Collaborator

stsrki commented Aug 16, 2024

Thank you for the submission.

If I'm not mistaken, this will only check if the public API should be allowed to be publisdhed. It will not check if the new API can be used?

For example, in #5692, we never supported generic methods to be used as a validator on a non-generic delegate.

@GeertvanHorrik
Copy link
Contributor

Thanks @SimonCropp for creating the PR, it was on my to-do list so thanks!

@stsrki : this will indeed check every public API change you make, and you have to manually approve the api change for the unit test to succeed. This way you are made double aware of any changes you make and can verify it in a different context.

About the usability: that's something that can be covered by regular unit tests?

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.

3 participants