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

Improve error message when using oneOf validation. Fixes #254 #272

Merged
merged 2 commits into from
Oct 11, 2017

Conversation

robframpton
Copy link

No description provided.

Copy link
Contributor

@jbalsas jbalsas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Robert-Frampton, should we add a test for this?

@@ -185,6 +186,15 @@ function composeError(error, name, context) {
}

/**
* Composes an error message for Conifg.oneOf validator.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible typo: Conifg.oneOf -> Config.oneOf

@robframpton
Copy link
Author

We don't currently test the contents of any error messages, we only test that an error is returned or not given the input. We can add tests for this, but if we do we should probably add tests for the other use cases as well.

@jbalsas
Copy link
Contributor

jbalsas commented Oct 10, 2017

Sounds good, just the typo, then 👍

@robframpton robframpton changed the base branch from master to develop October 10, 2017 16:25
@jbalsas jbalsas merged commit ae3dbb4 into metal:develop Oct 11, 2017
@jbalsas jbalsas added this to the 2.14.0 milestone Oct 11, 2017
@diegonvs
Copy link
Contributor

Hey @Robert-Frampton i was reviewing that tests and i've started a discussion here:
#277

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