How to test my project

How to test my project
0

Hi, I have finished my Random Quote Machine project here:"https://codesandbox.io/embed/9zmvwv4v6p"with test script, but it didn’t work.
what’s wrong?

Other than not being able to read yellow text on a white background, what didn’t work? It seems to be working.

I added test script but I can’t see that dialog box.

Ohhhh…d’uh! Sorry, guess I should’ve gleaned that from your title. :slightly_smiling_face:

I don’t see this;

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

before the closing <body> tag in your index.html. That’s where it should be.
(Disclaimer: I’m not too familiar with codesandbox so I may be reading it wrong)

1 Like

I tried, then the dialog box disappeard after a second.

Sorry, I shouldn’t have chimed in. I’m more familiar with codepen and repl.it. I don’t know why codesandbox would do that.

Someone else step up please…

That’s fine, thank you anyway.

Hey @sadJohn if you’re still wondering about the FCC Test Suite with Code Sandbox, you can either add the dependency “react-fcctest” in the left panel and then add

import ReactFCCtest from 'react-fcctest';

at the top of your App.js file and then include

<ReactFCCtest />

in its return statement along with the rest of your code OR you can just add

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

in the “External Resources” section of the left panel and then click on “Add Resource”.

Thanks so much @amamenko! I just stumbled on this post after spending a couple hours trying to get the tests setup, and your suggestion is what worked.

Best,
Thomas