731efaaaae1a22479b413b4bea2e84eb1fedb66a
the test fails if there is no space between @media and the parenthesis, even though it is possible to not have a space. Also it doesn't tell you that that is the problem, so it can make the person get stuck trying to figure out what they did wrong, when in fact they were right, like I was for half an hour until I came here to check the test =)
Challenges
The seed
directory contains all the challenges that appear on the freeCodeCamp learning platform.
For each challenge section, there is a JSON file (fields documented below) containing its name, seed HTML, tests, and so on.
Usage
command | description |
---|---|
npm run test-challenges |
run all challenge tests (for each challenge JSON file, run all tests against all solutions ) |
npm run test |
run all JS tests in the system, including client, server, lint and challenge tests |
node seed |
parses all the challenge JSON files and saves them into MongoDB (code is inside index.js) |
npm run commit |
interactive tool to help you build a good commit message |
Links
- Challenge Style Guide - how to create and format challenges
- Contributing to FreeCodeCamp - Writing ES6 Challenge Tests - a video following Ethan Arrowood as he contributes to the curriculum
- Challenge schema - lists all of the fields inside challenge, and describes some of them
- Challenge types - what the numeric challenge type values mean (enum)
Challenge Template
{
"id": "unique identifier (alphanumerical, mongodb id)",
"title": "Challenge Title",
"description": [
"Challenge description.",
"An new string in the array will create a new paragraph."
],
"releasedOn": "date formatted like: January 1, 2016",
"challengeSeed": [
"// code displayed in the editor by default",
"// a new string in the array is a new line"
],
"solutions": [
"at least one code solution that passes the tests below, used for automated testing (and inspiration for students)."
],
"tests": [
"an array of assert tests that check if the user's solution is working",
"assert(aFunction('argument') === 'result', 'message: This message explains what the test is testing');",
],
"type": "string identifying type of challenge. takes priority for viewType",
"challengeType": "number identifying type of challenge (step, project, normal). takes priority for submitType",
"isRequired": "boolean value that indicates whether challenge is required for certificate",
"translations": {
"language-code": {
"title": "The Title in a Different Language",
"description": [
"The description in a different language."
]
}
}
},
Description
freeCodeCamp.org's open-source codebase and curriculum. Learn to code for free.
careerscertificationcommunitycurriculumd3educationfreecodecamphacktoberfestjavascriptlearn-to-codemathnodejsnonprofitsprogrammingreactteachers
Readme
503 MiB
Languages
JavaScript
47.2%
TypeScript
46.3%
CSS
6.1%
Shell
0.2%
Dockerfile
0.1%
Other
0.1%