testable projects for freecodecamp.org curriculum expansion
Clone or download
tbushman Merge pull request #643 from ValeraS/fix/markdown-test
fix: use checks not specific for marked.js
Latest commit a3c2ffe Oct 15, 2018
Permalink
Failed to load latest commit information.
.github add spacing in pull request template Jul 19, 2017
config feat: certificates are created before live-server launch Aug 18, 2018
local_test Revert "feat: Use webpack-dev-server" Aug 23, 2018
src Merge pull request #643 from ValeraS/fix/markdown-test Oct 16, 2018
test fix: shapes aligned with ticks test Oct 9, 2018
travis-screenshots fix: deploy Travis CI screenshots to travis-screenshots branch Dec 21, 2017
.babelrc feat: use async functions for tests Oct 10, 2018
.eslintignore feat(tools): husky, commitlint and commitizen was added Aug 31, 2018
.eslintrc fix(eslint): Add freeCodeCamp config Dec 7, 2017
.gitignore feat: Automating build deploys to CDN Sep 2, 2018
.travis.yml test: headless mode and support for Firefox Sep 27, 2018
CONTRIBUTING.md test: headless mode and support for Firefox Sep 27, 2018
LICENSE.md Add BSD-3 license Jan 12, 2017
README.md fix: update path to build.js CDN in README (#504) Aug 3, 2018
TODO.md update TODO.md Jan 29, 2017
commitizen.config.js feat(tools): husky, commitlint and commitizen was added Aug 31, 2018
commitlint.config.js feat(tools): husky, commitlint and commitizen was added Aug 31, 2018
deploy.sh chore(deploy): change the direct link to the CDN repo to a variable Sep 20, 2018
package.json feat: use async functions for tests Oct 10, 2018
webpack.config.dev.js feat: webpack-dev-server is used for develop Aug 25, 2018
webpack.config.js Shadow DOM with regular Element fallback -- requires custom Mocha rep… Aug 14, 2018
yarn.lock feat: use async functions for tests Oct 10, 2018

README.md

master branch: Build Status

testable-projects-fcc

A CDN loaded test-suite for testing the beta.freecodecamp.com Frontend Libraries Certification waypoint projects. image image

What is this, you ask?

  • This repo is a part of the FreeCodeCamp.com curriculum expansion, and represents our front end testable projects, err... project.
  • Our goal is to make every waypoint project, which each correspond to different sections of the curriculum, fully testable using a TDD-like methodology - such that our campers will have predefined test cases, which start out failing, and that they must make pass.
  • This codebase is the test suite, and individual sets of test cases for each of these projects.
  • We are serving the tests via CDNs (see below), which can easily be imported into any of our projects, whether they are developed locally, on CodePen (as our example projects are), or anywhere else.
  • You can see examples of these projects here: http://codepen.io/collection/npZPmR

Bundle CDNs:

Testing this project

Warning that this gets a little meta. This project provides a feature that will test camper project code.

As such, this project should be seen as more of a feature, than as automated testing. The feature mostly includes automated testing for the students to run, but it does have a UI, and the tests do not run against our code.

So how do we make sure this feature, used by millions of campers, actually works in production? The confusing answer is that we need to test this feature, which means testing the Camper tests.

We do this by running the Camper project tests (everything in the src directory) over the example CodePen projects. Since the example CodePen projects are supposed to be working examples, if the tests do not pass for the example CodePen projects, we need to either fix the tests, or fix the example project that fails.

In most projects you wouldn't test the tests, but in this case, the CodePen Camper Project Tests are a production feature potentially used by millions of campers, so it is important we don't break that feature.

This is important to understand so I'll repeat it in different words: the tests in the src directory of this project are not typical tests used to check our own code before deploying. Quite the opposite, they are a production feature that is used by students in a live setting to check their own code. As such, it is very important that we don't break those tests.

In order to keep things from being confusing, we refer to everything in the src directory as the "CodePen Project Tests" or the "Camper Project Tests" or "Testable Projects Tests". Those tests are the feature we are shipping.

Opposite of the above, all of the code that lives in the test directory is the typical tests used to check our own code before deploying. We simply call this code the "automated testing". It tests the feature we are shipping.

The automated testing can (and should) be performed locally by you before creating a PR. The tests also run automatically on Travis CI every time you create a PR. A PR that has not passed the Travis CI tests should not be merged.

For all the details about automatically testing this project, please see the CONTRIBUTING guide.

Credits:

This repo did not originally live here. There are several important contributors who contributed code before this project took its current form. So credit where credit is due, to those contributors, and to the other key contributors for this project: