This test does not pass although i did everything correctly, i did even restart the everything yet nothing, i get stuck here even after restarting the whole thing. Any idea why ?
maybe try using the Reset button in Code Road, then write the code again
In my case the error was that my \n~~ Countdown Timer ~~\n line was within if [[ $1 -gt 0 ]] loop in the countdown.sh script.
Why was that a problem?
I checked the test files (I recommend you doing the same) within /project/.freeCodeCamp/test/ - test file that failed was 1490.test.js . This file checks two things:
- If all headers are printed out
- Will countdown.sh fail if something else than 3 is an argument - in that case letter “a“ was used
So since the line that echoes header in the countdown.sh was within “if arg1 is a number greater than 0” it never got printed out when test file checked for arg1 beeing a letter “a”.
So the solution that worked for me was:
Move the \n~~ Countdown Timer ~~\nabove if [[ $1 -gt 0 ]]in the countdown.sh.
This test also passes four “?“ as arguments to check if questionnaire.sh and fortune.sh works properly - so this might be an issue as well. Also allow the countdown.sh to fail when “a” is given as an argument.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
