freeCodeCamp / curriculum

The freeCodeCamp curriculum and lesson editor
Creative Commons Attribution Share Alike 4.0 International
81 stars 124 forks source link

fix(challenges): fix regex in a JS challenge #257

Closed pom421 closed 6 years ago

pom421 commented 6 years ago

See more details on fix issue https://github.com/freeCodeCamp/learn/issues/269

BREAKING CHANGE: None

ISSUES CLOSED: #269

Description

Pre-Submission Checklist

Checklist:

Closes #269

scissorsneedfoodtoo commented 6 years ago

@pom421, sorry for the delay in reviewing this. All your changes look good! I just noticed a couple of things.

First and most importantly, your commit message has BREAKING CHANGE in it. Even though you wrote "None" it will still cause a major version bump with the next release. I've definitely made this mistake before, and it's something that should really be in the contributor's guide.

Second, I noticed a small typo in the last test. It was already there, but since you're improving this challenge would you mind improving it just a bit more? There were a couple unnecessary backslashes, which caused one of them to appear in the test text.

Here's what the test should look like:

        {
          "text": "Your regex should not match <code>\"Timber\"</code> with 30 <code>m</code>'s in it.",
          "testString": "assert(!timRegex.test(\"Ti\" + \"m\".repeat(30) + \"ber\"), 'Your regex should not match <code>\"Timber\"</code> with 30 <code>m</code>\\'s in it.');"
        }

To make these changes, just open up your branch in your code editor of choice and update the test. Then using the command line add the file you changed, and just run git commit --amend and delete the breaking change from your commit message so it looks like the following:

fix(challenges): fix regex in a JS challenge

See more details on fix issue https://github.com/freeCodeCamp/learn/issues/269

ISSUES CLOSED: #269

After that, all you need to do is to push up to your branch again and we should see the changes here. Keep in mind that you may need to force push by using git push -f if you set the upstream, or git push -f origin fix-js-regex if you didn't.

Hope you don't mind doing these things! Let us know if you run into any problems along the way.

pom421 commented 6 years ago

@scissorsneedfoodtoo I have made as you proposed but there is conflicts now.

I hope it will be good to you. On my side, I will not be able to change it before 3 weeks (holidays ;))

scissorsneedfoodtoo commented 6 years ago

@pom421, thank you for making those changes. No need to worry about the failing build--I was able to fix it on my end.

Congratulations on your first contribution to freeCodeCamp! :sparkle: Looking forward to your next contribution. Enjoy your holiday!

raisedadead commented 5 years ago

:tada: This PR is included in version 3.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: