freeCodeCamp
freeCodeCamp copied to clipboard
feat(client): show error, warn, and info in FCC debug console
Checklist:
- [X] I have read and followed the contribution guidelines.
- [X] I have read and followed the how to open a pull request guide.
- [X] My pull request targets the
main
branch of freeCodeCamp. - [X] I have tested these changes either locally on my machine, or GitPod.
Closes #48744
@a2937 Would you provide some instructions on how to test your fixes.
@a2937 Would you provide some instructions on how to test your fixes.
Manual testing:
Step One: Start up the local FreeCodeCamp client and server with MongoDB database running in the background,
Step Two: Navigate to the client on port 8000 in your preferred web browser.
Step Three: Open up the curriculum
Step Four: Navigate JavaScript Algorithms and Data Structures
Step Five: Open a random challenge
Step Six: Find the text box to type the code in
Step Seven: In the text box type console.log("Hello");
to have something to compare it to. Notice in the output it says "Hello"
Step Eight: Type console.info("Hello");
into the text box. Notice it should say "Hello" in the output as well.
Step Nine: Type console.warn("Warning");
into the text box. Notice it should say "Warning" in the output.
Step Ten: Type console.error("Error");
into the text box. Notice it should say "Error" in the output.
As for automated testing, I would be happy to provide some. However I had difficulty finding existing unit tests for the proxy logger.
As for automated testing, I would be happy to provide some. However I had difficulty finding existing unit tests for the proxy logger.
I don't think it's needed, there are no steps that requires using them, and when there will be one, the step itself will act as the unit test
Understandable.
![]()
I wish we could DRY this out a bit, but it works as is!
I could create a new method in test-evaluator called "pushLogs" that would take care of the biggest offender.