How to run the test scripts for the beta challenges?


I’m keen to learn from the new (beta) curriculum but for various reasons do not like using CodePen. Instead I use my editor (Sublime Text) and save my code to GitHub.

My question is how do I run the freeCodeCamp test script?

What I tried was to save the test script to test/test.js in my project root. I installed Mocha and Chai. When I ran the command mocha from the command line, I got an error message ReferenceError: document is not defined.

Any tips on how to get this set-up greatly appreciated!


You add a script in your index.html"

<script src=""></script>

Thanks @jenovs, that got it working. So simple when you know how! :smile: