freeCodeCamp / curriculum

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

Problems with layout and tests for various Rosetta Code challenges #277

Closed scissorsneedfoodtoo closed 5 years ago

scissorsneedfoodtoo commented 6 years ago

Describe the bug

This was brought up on the Contributor's Chat Page by @Dangeranger. Seems that a number of the Rosetta Code challenges have minor/major layout issues, and also problems with the tests. Here's @Dangeranger's screenshot of the tests throwing errors:

image

Seems like this is because some challenges rely on an array of tests named tests in the tail section to fill in parts of the texts for the test suite section of the page. However, because the Curriculum JSON has a field named tests, when a solution is submitted on the page it instead calls the JSON tests array rather than the one from the tail.

The easiest way to fix this is by going through the existing problems, giving the tests array in the tail a unique name and adjusting the layout as needed. For many of the problems I removed the unnecessary paragraph tags.

Below is a list of challenges I made more major formatting changes to:

And challenges that had problems with the tests or challengeType:

Note that none of these fixes address the mathematical functions. We would need to re-enable the MathJax over on the Learn platform for those to render properly. There's already a PR to render mathematical functions only on the Rosetta Code pages that's waiting for QA/approval.