25+5 clock test 8 failed

Hello everyone!
There’s a test 8 failed and other tests failed in my app. Basically (except sound), it works, but it fails tests. I spend a lot of time doing this challenge and I have no idea what to do with this issue.
The error text is:
time-left is not formatted correctly: expected '26' to equal '60' AssertionError: time-left is not formatted correctly: expected '26' to equal '60'
You can access code and play with it in sandbox via link 25+5 clock FCC - Replit
You can also view my project via GH-pages link 25+5 clock and play with it a little bit with react extension for your browser.
You can find source code here: GitHub - Vaskovskied/twenty-five-five-clock-fcc
I know, there’s many similar topics in this forum, but none of them helped me.

share your codepen link for this here as well, for convenience :slight_smile:

@bappyasif, now it’s there. You can get it via this link: 25+5 clock FCC - Replit

You have to switch to React 17 or use ReactDOM.render (to opt-out), React 18 is incompatible with the tests.

When I do that two new tests fail. The session/break label switching. When I run it, it goes from session to break, but it doesn’t switch back to session again when the break timer runs out.

1 Like

Thank you very much! Honestly, your help is priceless. I’ll gonna solve this two problems soon.
But I have one interesting thing to say. All my previous React.js projects for this course was made in React 18, and all test are passed with it. Should I change version of React for those too?

Well, not if they are passing. We did sort of fix some of the tests so they work (kind of) with React 18 and some of them don’t seem to have an issue.

You can also use the new flushSync function React provides which can solve some of the issues with React 18 and the tests.

But I guess instead of having to guess if it’s an issue with the React version when testing the projects it might be easier to just downgrade. Up to you, if you are willing to test it and spend some time debugging if the React version is an issue or not.

1 Like

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