How to test your code

Hello, I can’t test my code and I can’t find the functionality to test my code.
How do you do it?
thanks everybody

What code are you testing?
What lesson are you on?
What language are you using?

Your navbar needs to have a fixed position so it’s always visible and you need to add more
code elements, whole page needs 5 of these and your tests will pass.

Did you respond to the wrong topic?

Oh dang, I think I did, I had a bunch of tabs open, it was supposed to be for another topic.

sorry I forgot to mention that I wanted to test my freecodecamp projects

Hello, I can’t test my code and I can’t find the functionality to test my code.
How do you do it?
thanks everybody

Can you be specific about what you mean by test your code?

What kind of tests are you wanting to perform?

there is a new method on freecodecamp to test its code.
you know the little window on the top right edge of the pen code page!

Yes, if you want to test any of the projects, you can add the following script to the JavaScript Codepen settings:

https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js

or if you are not using Codepen, you can put the following into the html file your project code resides:

script src='https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js'></script>

oh thanks :wink: it’s great

Where do you add the JS codepen settings with the other commands? I’m trying to test my project with the user stories for the FCC Product Landing Page. I’m unable to find or recover the hamburger icon.

Example of my JS code (not sure if it’s wrong as I’ve never used JS before)

// coded by @atjonathan
const projectName = ‘product-landing-page’;
localStorage.setItem(‘example_project’, ‘Product Landing Page’);
https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js

When you fork the FCC sample project the JS tests should be in the HTML section. If you’re starting with a blank pen, paste the following at the top of the HTML section. This will give you the hamburger menu.
Click to expand it, run the appropriate test and if any fail you can click on the red button to see with test(s) have failed and why.

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