-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Enable multiple config options for jest-validate #4337
Comments
I like this approach |
I'd call it |
@thymikee @cpojer if we are going to support ( This is what we currently show:
Would it be something like this?
|
Ideally the example will show both possibilities collapsed in one error message, duplicating it may be easier in code but looks worse. |
yes! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
Currently
jest-validate
takes real JS object as a configuration sample, which doesn't scale to one config option having multiple possible valuesWhat is the expected behavior?
Being able to validate things like this:
This can be fixed by introducing utility functions into
jest-validate
Where
multiple
would have it's unique$$typeof
identifier for which we could test.This is however just a proposal of the API, so if anyone has better ideas, this is right place to do so :)
cc @rogeliog
The text was updated successfully, but these errors were encountered: