Testing projects with CDN link

Tell us what’s happening:
I’m working on the quote machine project using VS code locally on my computer. I’m building it with create-react-app. I’ve added the CDN to in the script tags on index.html.

My question is how do I run the tests in this environment and see if I’m passing the required tests?

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36.

Challenge: Build a Random Quote Machine

Link to the challenge:

you need to open your project, like a preview mode, or open the html file in your browser. You can run the tests from anything that open your page.

remember that you need an online version to submit later

Thanks @ilenia. I’m still a bit confused about running the tests. I currently have my react project open in the browser in development mode, but I don’t know how to actually run the tests using the cdn to see if they pass. I put the cdn link in the head of the index.html

Also when I’'m done with the project, can I put it on GH pages and use that link to submit?

Thanks for your help!

Since it’s JS it doesn’t belong in the head. It’s not a link. I don’t believe it will even work there. Scripts belong just before the </body> (closing body tag) in index.html.
When you have it you’ll see a green hamburger menu in the upper left. Click on it, select the project and then ‘run tests’. If there are failing tests you’ll see the button turn red telling you how many passed/failed. Click on the red button to see which tests failed and why.

1 Like