Project tests on codepen.io

How can I do the test of my project on the codepen.io page. I’ll be happy if you can help me.

Hi

In Codepen, open the javascript panel, click the cog icon to open “settings”, then click “add another resource” button.

Replace the placeholder script link with the following:

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

Click the “save and close” button.

Alternatively, you can add this script tag after your code in the html section of Codepen:

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

If the you have added the script correctly, now when you open your pen in “full page view” you will now have a “hamburger” menu in the top left corner.

Click it to open the menu.

Select the current challenge project from the list.

Click “run tests”.

If all the tests pass you should get a green button.

If any of the tests fail, the button will be red.

Click the red button to get details of the failing tests.

Update your code, and repeat until you pass all the tests.

Hope that helps :slight_smile:

2 Likes

Thank you very much for your help. thanks to you I solved the problem…

1 Like