Front End Development Libraries Projects - Build a Random Quote Machine

Could anyone guide me how to run tests on codesandbox if its not possible how to run test locally?

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36

Challenge: Front End Development Libraries Projects - Build a Random Quote Machine

Link to the challenge:

The test script does not work with the create-react-app templates CodeSandbox has.

You can use StackBlitz with a Vite template. Just add the test script to the index.html file at the bottom before the closing body tag.

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

CodeSandbox does have an official React Vite template but it is using TypeScript. You can go into the tsconfig.json config and set strict to false which might let you use it without doing much of any TypeScript. Or try using TypeScript as is, it shouldn’t be that bad with this simple project. But you will likely get some errors that need to be dealt with.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.