-
Notifications
You must be signed in to change notification settings - Fork 24
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
Improve grouping of spec errors #165
Labels
Comments
@kelvinqian00 Thanks for reporting this! Yes, this appears to be a bug in how Expound groups specs. |
Merged
Merged
@kelvinqian00 Thanks for reporting this and for your help with the fix! The fix is in version 0.8.0, which I've just released. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been using Expound and overall it's a great library. However the grouping and numbering of spec errors seems to be haphazard, which is annoying when one is validating (for instance) a map with many
keys
predicates.Here, we have a example
keys
spec:Then if I want to validate the following map:
I ideally want the following output (the Relevant Specs section has been removed for clarity):
where Expound prints out each failing spec in its own separate error message. However, what Expound actually does is print out this:
which is not what I want. Not only do the
::foo
and::bar
specs have nothing to do with each other (they are not two paths on ans/or
or anything like that), but there are clearly 3, not 2, errors here.Right now I've been using a hacky solution where I separate the original spec error map into a list of multiple error maps and using the
expound
method on each of them. But this comes with its own problems (it messes up the Detected Error count and overall it's just an ugly hack), so if this gets addressed that would be awesome.The text was updated successfully, but these errors were encountered: