Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

prevent ramp from having duplicate stops #397

Merged
merged 1 commit into from
Dec 23, 2015
Merged

Conversation

mayagao
Copy link
Contributor

@mayagao mayagao commented Dec 22, 2015

@jfirebaugh Do I also need to create a test for this? Doesn't seem to have a test for ramps.

cc @samanpwbb

@jfirebaugh
Copy link
Contributor

Yes, insert a test case here, and then run UPDATE=1 npm test, which should update functions.output.json with the expected output.

@mayagao
Copy link
Contributor Author

mayagao commented Dec 22, 2015

is this the right way?

@jfirebaugh
Copy link
Contributor

The line number updates in functions.output.json are expected, but I'd also expect to see a new error with the text "array has duplicate stops" in the output. Since it's not there, for some reason the test case does not trigger the new validation. Can you try using == instead of ===? The validator uses boxed types so that it can attach line numbers to them, which means that === comparison doesn't always work.

@mayagao
Copy link
Contributor Author

mayagao commented Dec 23, 2015

ok updated, thank you @jfirebaugh

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants