When i click on run tests it says " mocha div missing paste it in your document " can someone tell me what this is
Sounds like an internal error to the test (mocha is the test framework). How are you adding the test script? If it is on Codepen, can you link to the project?
Try re-adding the test to the page
yea sure here : https://codepen.io/Rcrisp/pen/NZNwMP?editors=1100
I don’t get an error and you are passing all the tests. You can submit it.
Remember to remove the script from the HTML so you only have it in the settings.
I get that all the time and then my tests never run. Once I put an empty div #mocha at the end of the
body the tests run. It’s their mistake I just gotta roll with it.
PS I wonder if the FCC instructions and codepen template are older than codepen.io’s rewrite in react?
I followed @lasjorg 's instructions to add the bunde.js to the codepen settings, removed the
<script> line from my HTML, and then refreshed my browser. That fixed it.
Regardless of which technique you choose, the trick seems to be that you must refresh your browser after making the FCC recommended changes in order to load the bundle.js library into your codepen.
Many many thanks!
I am currently encountering this problem and have tried all available suggestions to no avail
With the div #mocha recommendation, did you use something like the following at the end of
<div id="mocha"> </div>
Yeah it’s really strange. I’ve gotten better at using codepen.io. Now I make sure I sign in then fork and save it rename it and I seem to avoid the problem. If it persists then I just put it at the end so it’s out of my way. Don’t no why I just can’t edit and test as Captain Anonymous.
Go to browser cookie setting and turn off “Block third-parties cookies”
This worked for me