fix(challenges): fix regex in introducing else if challenge#262
fix(challenges): fix regex in introducing else if challenge#262scissorsneedfoodtoo merged 1 commit intodevfrom unknown repository
Conversation
|
@devocija-it, thank you for submitting a fix for this longstanding issue! But unfortunately in my testing I found the regex to be just a bit too rigid. As it is now, I can only pass the challenge with the following code: Any other white space or line breaks between the if..else statements make it so the new test won't pass. Would you mind updating the test to the following? This should allow for any amount of white space throughout the code while still requiring both curly braces. If possible, could you check this out locally on your end just to confirm it works? Let me know what you think and if you have any other ideas. Please take a look at this section of the Contributor's Guide for how to update your PR and amend your git commit message. Also, feel free to reach out if you need any help with the process. |
i've added a test for if else statements curly braces to ensure that every condition has to have both opening and closing curly braces. I've also made changes that were by scissorsneedfood. ISSUES CLOSED: #17155
|
@scissorsneedfoodtoo i've made changes that you suggested. I also tested it locally and it works as expected. |
|
✨ ✨ ✨ Awesome! Congratulations on your first contribution to freeCodeCamp! ✨ ✨ ✨ Thank you for improving this challenge, @devocija-it, and also for making those changes so quickly. We're all really looking forward to your next contribution. |
Hi @QuincyLarson !
I've added a test for if else statements curly braces to ensure that every condition has to have
both opening and closing curly braces.
ISSUES CLOSED: #17155
Description
I've added additional test case to Basic JavaScript: Introducing Else if statements challenge to ensure that every condition in in the else if statement has to have both opening and closing curly braces.
Issue Link
freeCodeCamp/freeCodeCamp#17155
Pre-Submission Checklist
devbranch.fix/,feature/, ortranslate/(e.g.fix/challenge-tests)npm test.npm run committo generate a conventional commit message.Learn more here: https://conventionalcommits.org/#why-use-conventional-commits
If they were done on the web interface you have ensured that you are creating conventional commit messages.
Checklist:
Closes freeCodeCamp/freeCodeCamp#17155