Hello,
I don’t know if this has already been reported (I didn’t found any topic in the forum) but as several persons reported in this forum, although I intensively tested it and never could lead it to fail , my number_guess.sh script couldn’t pass the coderoad tests. It appeared that error messages raised sometimes at step 8 (“8 Your script should print the correct welcome message for returning users”) at systematically at step 11 (“11 Your script should print the correct messages if they do not guess the correct number”).
As I couldn’t figure out where the mistake was, I took a look at the 1.1.test.js file and found what looks like a bug. At line 116 which is supposed to check if the output is “It’s greater…” OR “It’s lower…” there is an AND ( && ) operator (which is a condition impossible to satisfy) :
asssert(/It's higher than that, guess again:/.test(scriptOutput) && /It's lower than that, guess again:/.test(scriptOutput));
I changed it to || and everything went well (btw I was surprised to see that I had the credentials to edit/save the test code ).
About the 8 test, I’m not sure because I don’t know any JS and JS regex, and the fail was not systematic, but it seems that it expects the output to change accordingly with the number of best guesses (singular/plural) : it is written guess(es) at the end of the sentence, which is not consistent with the way instructions are set out.
const reString = 'Welcome\\s+back, \\s+${usernae1}!\\s+You\\s+have\\s+played\\s+1\\s+games?,\\s+and\\s+your\\s+best\\s+took\\s+${guesses}\\s+guess(es)?\\.
Hope this can help…