How to include the FCC test CDN ( Bundle.js ) in my local react project?

How to include the FCC test CDN ( Bundle.js ) in my local react project?
0

#1

I’m using create-react-app for the Random Quote Machine project. Where or how do I add the test cdn to pass the user stories ? I used the usual way of in the index.html file and it doesn’t work that way.


#2

you have to add the cdn link in your codepen project, see this page here for more info: https://github.com/freeCodeCamp/testable-projects-fcc


#4

You didn’t understand… I’m not making the project on codepen.io. I have a local React project in my pc I setup with the package create-react-app


#5

just add it in a script tag just before the closing </body> tag.

like it is below:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Pomodoro Clock</title>
</head>
<body>
  <div id="app"></div>
  <script src="bundle.js"></script>
  <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
</body>
</html>

#7

Thanks ! Well that fixed it . I realized that I was rendering the<div> inside the body with ReactDOM.render so the test button that came in from the script needed to be on it.