Can't place test suite in 25+5 clock

I think this belongs to project feedback or FCC support. But anyway, I have built my React 25+5 Clock at its core at least (I’m planning to add some more CSS and styling but the timer itself is ready and all) and when I link a script with an src set to what the project page says (i.e “https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js”) the bars with the test suite don’t appear, i tried placing it before the head, in the head, after it, in the body, after the body but it doesn’t seem to work anywhere, from what i ran the clock seems to work absolutely ok but tests will tell better, any help?

link to the project : https://codepen.io/harel_avv/pen/RwGQEXy

Could you show us where or how you were adding it?

I checked the HTML, and your Pen JavaScript settings and don’t see your attempt to add the external script anywhere.

1 Like

i added it everywhere, i just deleted it afterwards, but ok, I’ll try to add it a bit more times

Alright, I decided to play with your project now that you added an attempt since it looked perfectly valid. :thinking:

This appears to be some funny behavior from CodePen is all.

Typically with CodePen, there is no need to type out the skeleton of the document, skip html, head, and body, only write what would be inside of body. CodePen does the rest for you.

<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<div id="lmfao">
</div>

If you do something more like this, it’ll work.

The <script> tag can go anywhere in the HTML, so in this case it’s just the first line of body.

Then instead of recreating the body element, we put your code into a div.

2 Likes

So I think the issue is, that you are rendering your react component directly to the body, as opposed to for example a div within the body.
If you just add the script inside the body, and you also add a div with the id “lmfao” as well as remove that id from the body, everything should work

1 Like

thank a lot @michaelmanke00 @sethi , since you had pretty much the same solution at the same time i don’t know who to mark as “solution” haha :sweat_smile:

2 Likes

@sethi was faster by a couple of seconds, so I guess the early bird can get the worm :wink:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.