Betterer style comparisons #1405
mscottford
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm considering using Betterer on one of my projects, but I'd prefer a similar solution that doesn't require installed Node.js. (I'm also leaning towards using a Docker container to avoid that.)
I got the idea that Verify could add verification modes where something is allowed to get "better" and in that case, the test will pass, but the test will fail if the result gets "worse". "Better" and "worse" would be context dependent, and it should also be possible to define generic rule sets, such as less-than-or-equal.
Example,
A unit test could use reflection to find number of classes that implement a deprecated interface. That number is then verified using a less-than-or-equal rule. When the test is run, if the current value is less than or equal to the verified value, then the new value is auto-verified, and the test passes. Otherwise, the test fails.
Is anyone else interested in this?
Beta Was this translation helpful? Give feedback.
All reactions