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

use object structure to allow multiple valid and invalid options for tests #23

Merged
merged 3 commits into from Sep 2, 2015

Conversation

pippinlee
Copy link
Contributor

Refactor Validator.test.js to allow us to test an array of valid and invalid options. Switch to object structure, now uses:

validatorTerm, valid, invalid, invalidMessage

should.deepEqual(data[0].assert(data[1][0]), data[1][1]);
should.deepEqual(data[0].assert(data[2][0]), data[2][1]);
it('#' + key, () => {
data.valid.forEach( e => {
Copy link
Owner

Choose a reason for hiding this comment

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

It would be a better idea to name this something descriptive, such as testCase

@k88hudson
Copy link
Owner

Just a small nit, and if you could fix the commit message that would be awesome ^_^ thanks! After that it's good to go.

I'm not sure how it could possibly have decreased coverage...

@k88hudson
Copy link
Owner

Aha! Found the problem -- you're missing the hexColor tests

@k88hudson
Copy link
Owner

💃

k88hudson added a commit that referenced this pull request Sep 2, 2015
use object structure to allow multiple valid and invalid options for tests
@k88hudson k88hudson merged commit f8d48a8 into k88hudson:master Sep 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants