Front End Development Libraries Projects - Build a 25 5 Clock

**Project 25+5 Clock “done” but its built in React 18.2.0 **

The test script wont work,
after a little googling, I found:

I won’t know if the project is done or not :frowning:
How should I proceed?

my code:

live site:

Your browser information:

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

Challenge: Front End Development Libraries Projects - Build a 25 + 5 Clock

Link to the challenge:

I was able to follow this article to get your app running using React 17 and your app passes 26 out of the 29 tests.

The main points are:

  1. Delete node_modules.
  2. Delete package-lock.json
  3. Make the following changes to your package.json file:
    "@testing-library/react": "^13.3.0",
    "react": "^17.0.0",
    "react-dom": "^17.0.0",
  4. Make the following changes in your ./src/index.js file:
    import ReactDOM from 'react-dom/client';
    import ReactDOM from 'react-dom';
    const root = ReactDOM.createRoot(document.getElementById('root'));
     <Provider store={store}>
       <App />
     // <React.StrictMode>
     // </React.StrictMode>
    const root = document.getElementById('root');
     <Provider store={store}>
       <App />
  5. Run npm install
  6. Run npm start

NOTE: Of the 3 tests you are failing, you can easily fix the one where the sound plays when the timer hits 00:00. The other two tests are technically testing for an invalid app. The tests actually expect the timer to go from 00:00 back to the applicable session or break length time. Of course doing this ends up adding one second more to each session and break. Over an hour, this would add 1 extra minute of session and 1 extra minute of break. You will have to hack your valid timer (in my opinion) just to pass the tests.

1 Like

Thank you so much @camperextraordinaire for your time and help!
Downgraded react to 17.0.2 and the tests work again
It was a really good idea :slight_smile:
( p.s. gotta do what you gotta do to pass the tests )

Have great day!

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