25 + 5 Clock tests error

I got error in test case no 10 but success in test case no 11.

10. If the timer is running and I click the element with id=“start_stop”, the countdown should pause. (error)

11. If the timer is paused and I click the element with id=“start_stop”, the countdown should resume running from the point at which it was paused. (success)

And error for test case no 12 and 14 even though the value in display is changed Preformatted text

Hello, please post the link to this, codepen , replit or any Ide for the project.

here’s the link. Is my code wrong or should I downgrade to React v17?

There are know issues with react 18 so you could try that, the other thing is you run imports from settings by typing in react in the seach using react and react-dom.
No imports are needed with CodePen.

Challenges (Front End Development Libraries Projects): Multiple tests breaks with React 18 · Issue #45922 · freeCodeCamp/freeCodeCamp · GitHub

1 Like
  1. Your state setters should be pure. Do not reassign the current state, just return the derived state.

For example:

setSessionLength((currValue) => currValue - 1)

And not:

setSessionLength((currValue) => currValue -= 1)
  1. You need to reset isPlay inside your reset handler.
  2. The last tests need the audio.
1 Like