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

Make validation unit tests more explicit #1637

Merged
merged 7 commits into from
Mar 1, 2023
Merged

Make validation unit tests more explicit #1637

merged 7 commits into from
Mar 1, 2023

Conversation

hannobraun
Copy link
Owner

I've seen it a few times now that validation unit tests that were supposed to fail didn't. This happened because such a test can easily trigger a different validation failure than it intended accidentally.

This pull requests makes all of the validation tests more explicit, adding a check for a specific error variant to each.

The validation check it was testing had already been removed. That the
test didn't fail was in fact accidental.
This prevents a warning popping up due to the next change I'm working
on.
This makes them easier to pattern-match on, which is important for some
improvements to validation unit tests I'm working on.
@hannobraun hannobraun merged commit 82d5c7a into main Mar 1, 2023
@hannobraun hannobraun deleted the validate branch March 1, 2023 14:07
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.

1 participant