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

Wherefore art thou could use more test cases. #14057

Closed
skylarjhdownes opened this issue Mar 23, 2017 · 4 comments
Closed

Wherefore art thou could use more test cases. #14057

skylarjhdownes opened this issue Mar 23, 2017 · 4 comments
Labels
help wanted Open for all. You do not need permission to work on these.

Comments

@skylarjhdownes
Copy link

Challenge Wherefore art thou seems lacking in test cases for invalid input. I would think that

whatIsInAName([{ "a": 1, "b": 2, "c": 3}], { "a": 1, "b": 9999, "c": 3})

ought to return an empty array, for instance. There is currently no check for this, so my code which returns

{ "a": 1, "b": 2, "c": 3}

passes all test cases.

@JoolsMcFly
Copy link
Contributor

Good catch. Your code doesn't pass the beta version though: https://beta.freecodecamp.com/en/challenges/intermediate-algorithm-scripting/wherefore-art-thou
so that's an improvement.

I'll investigate to see if we can make a PR against master branch.

@erictleung
Copy link
Member

@skylarjhdownes sounds like a valid addition to the tests. But we'll also need to add that additional requirement into the instructions.

@JoolsMcFly if changes are made, they can just go to staging.

cc/ @freeCodeCamp/moderators second thoughts? If the input for source is invalid, just return an empty array?

@erictleung erictleung added the status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. label Mar 30, 2017
@HKuz
Copy link
Member

HKuz commented Mar 31, 2017

I'm on board with that 👍

@raisedadead raisedadead added help wanted Open for all. You do not need permission to work on these. and removed status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. labels Apr 24, 2017
@LukeBousfield
Copy link
Contributor

I can help with this issue. I will make a pull request shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Open for all. You do not need permission to work on these.
Projects
None yet
Development

No branches or pull requests

6 participants