Possible bug in 25 + 5 clock project tests (React 18)

I have completed the 25 + 5 clock project. I built it using react v18.2.0.

The app is working just as I would expect but it can’t seem to pass the tests in the Timer section. I’ve rewritten the app two times now but the problem seems to persist.

I have reasons to believe maybe the test bundle doesn’t work well with React 18. I haven’t tried to downgrade so I’m not sure what really is happening.

You can view the project here

Let me know if I’m missing anything.
Thanks in advance.

You are right @kimjisena there is some issue with test bundles and it does not work with ReactDOM.createRoot (v18) method. For tests you have to use the ReactDOM.render method instead.
I’ve done that with v18 but I’ve to use ReactDOM.render in order to pass the test.

Thanks @saurabhv749 .

I guess I’d have to downgrade to v17 then since ReactDOM.render() isn’t a method in v18.2.0.

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