Change:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: The test error messages do not indicate anything about resolve and reject’s strings. This may throw some people off as the message error just indicates the if statement did not fire. Add a Link to the page with the problem: Test Code: Tell us about your browser and operating system: Browser Name: Chrome Browser Version: 4044.124 Operating System: iOS 81.0.4044.124 If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box): ! !
Hey , I just looked at the page, and want to make sure I got this right, Currently, the test cases only pass if "We got the data" and "Data not received" are the strings inside resolve and reject; if anything else is entered in then the tests fail. If I'm correct, the strings don't really matter, it's just having resolve and reject inside the if and else statements with a string inside. I just wanted to clarify what is needed before starting. BTW, I'm a CS student who's just getting into Open Source and thought it would be awesome to contribute here! I've used freeCodeCamp in the past to help me learn the basics of Web Development, and it really has changed how I look at coding overall. Attached are a couple of screenshots of what I tested. <img width="1540" alt="Screen Shot 2020-05-09 at 2 24 41 PM" src="https://user-"<img width="1533" alt="Screen Shot 2020-05-09 at 2 28 13 PM" src="https://user-"
Hey Thanks for jumping in! The instructions do say that the string does matter, however I believe the test messages should have something pointing the user in the right direction. Eg: Perhaps additional tests should be created for edge cases IDK . The file that needs to be altered for a PR should be:
Just my two-cents: As much as it would reduce posts asking for help on the forum etc., many (if not most) of the challenges require the user to be precise, and follow instructions well. Sure, we could change many tests in other challenges, but I would much rather have the tests as is, teaching users to debug their own code. In programming outside of tutorials, debugging is a massive portion of the process, and programmers do not always write their own tests. In my opinion, the tests are well-suit for teaching programming skills.
Just took a second look and it makes sense now, didn't see the part that specified what the strings had to be. I'll probably just add a couple of tests to check for what the strings are inside of resolve/reject and change the test messages depending on which ones were passed. BTW, if you don't mind me asking, why do you guys have all of your files in Markdown? I'm just curious for the sake of learning.
That’s a question or or some of the moderators could artIculate a better answer, but I think the theory is that markdown is an easy to read input for feeding the curriculum engine/logic.
TL;DR: Markdown is easy on editing. We used to have a json object (schema) for the challenges in the earlier days, but ever since we moved to - A static site generator, we started using markdown. It is easy for contributors to edit a text file. More often than not when making a quick contribution, you do not need to know how the underlying infra works, because maybe you are changing the instructions a little bit, fixing a typo, you get the idea. We wrote a custom parser (and a schema that it needs to be compliant with) to get the content out of the markdown and build the HTML pages (which is implemented as a Gatsby plugin of course). You are welcome to dig into the package to learn how it works. P.S: All questions are welcome, do not be shy :)
That makes a lot of sense thanks for the response, I have a couple more questions actually If you don't mind me asking, Since the challenges are made using Gatsby, how do you guys test your code? Do you make your own site and run it on there? Or do you use extensions on whatever IDE/text editor you use? Also, what does YML mean? I'm assuming YAML, but I honestly don't know, I think however that If I know what that means I can figure it out. Here's what I have so far:  What I want to do is change the first two tests to just resolve and reject with empty strings inside, then have the last two be with the correct string inside. These are probably very simple questions but I think they would help me out a lot as I contribute more this summer!
have you made a PR yet? When you do put the PR # in this thread so we can test your tests. If you need any help with this let me know. EDIT: Yes, YML stands for YAML files (yet another markup language). If you read the instruction on installing FreeCodeCamp locally there should be instructions for testing locally as well. To test curriculum: To test everything: Check out for all the commands for the project.
Also we have some documentation here: if you want to learn more.
I'm working on setting up my repo locally and getting a basic idea of the codebase, as I've never worked with YAML; if anyone else wants to fix this issue don't hesitate! I can work on something else. Like I said I'm new to open source so all of this stuff is new to me, apologies for me taking this long, I will be a lot more productive once I have more time on my hands.

Discussion:
```yml tests: <del> - text: <code>resolve</code> should be executed when the <code>if</code> condition is <code>true</code>. </del> <ins> - text: <code>resolve</code> should be called with the expected string when the <code>if</code> condition is <code>true</code>. </ins> testString: assert(removeJSComments(code).match(/ifs*(s*responseFromServers*)s*{s*resolves*(s*('|"|`)We got the data1s*)(s*|s*;s*)}/g)); <del> - text: <code>reject</code> should be executed when the <code>if</code> condition is <code>false</code>. </del> <ins> - text: <code>reject</code> should be called with the expected string when the <code>if</code> condition is <code>false</code>. </ins> testString: assert(removeJSComments(code).match(/}s*elses*{s*rejects*(s*('|"|`)Data not received1s*)(s*|s*;s*)}/g)); ```