How to run the test scripts for the beta challenges?

How to run the test scripts for the beta challenges?
0

#1

Hi,

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!

Thanks
Sam


#2

You add a script in your index.html"

<script src="https://gitcdn.link/repo/freeCodeCamp/testable-projects-fcc/master/build/bundle.js"></script>

#3

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