Tiny Change Required for a Single Challenge, US Telephone Number Validation, Allowing Nonsensical Answers

Hi :slight_smile:
Background: https://www.freecodecamp.org/challenges/validate-us-telephone-numbers - I wrote, but caught at least, some bad code which was accepted as correct because there are no tests, expecting to return true which include the digit “0”.

On line 17 I have used parseInt within my “if” evaluation which works for all the integers except 0 but the code passes. I have never been but I assume Americans use zero in telephone numbers. don’t even ask about the second expression in there.

So the screen shot also shows a telephone number including 0 which should pass but results in false.

So the question: Is there anything else to do when adding a new test to a challenge, aside from what goes into the relevant property within the relevant “seed/…/…/***.json” file from which the challenges are built?
Hopefully the case is that no other file require change and if so then I have already (forked & branched &) added a new test using all digits:
“assert(telephoneCheck(“012 345 6789”) === true, ‘message: telephoneCheck(“012 345 6789”) should return true.’);”,


So if there is nothing else and I can make a PR without any local testing then I will. Only because I have limited bandwidth and can’t clone/build the project locally.

You can suggest a test improvement in the form of a GitHub Issue. If you’re interested in submitting the fix yourself, you can check out the CONTRIBUTING document on FCC’s GitHub.

which i have done and then went on the merry go click round. Im not joining gitter and the fastest way to possibly get an answer was to ask here. Last time I asked for advice on the workflow of fcc via the issues I got no response. Really am getting frustrated as all attempts to be helpful and friendly in fcc are rebuffed.

The contributing document answers your question about whether testing is required:

It’s up to you whether you submit a PR. If not, then all you can do is submit an issue. Most of the people who manage GitHub Issues and contribute to FCC have been totally focused on finishing the new curriculum for a while.

I’m guessing I need to be even clearer somehow

If I receive an affirmative answer to that then I can make the PR the testing bit would only be relevant if there were additional changes required elsewhere. Otherwise someone who has it built locally can easily use the information I have taken the time to provide and run the tests.