When a session countdown reaches zero (NOTE: timer MUST reach 00:00), a new break countdown should begin, counting down from the value currently displayed in the id=“break-length” element.
Timer has reached zero but didn’t switch to Break time: expected ‘Work hard’ to not equal ‘Work hard’ AssertionError: Timer has reached zero but didn’t switch to Break time: expected ‘Work hard’ to not equal ‘Work hard’
When a break countdown reaches zero (NOTE: timer MUST reach 00:00), a new session countdown should begin, counting down from the value currently displayed in the id=“session-length” element.
Timer has reached zero but didn’t switch back to Session time.: expected ‘Rest’ to not equal ‘Rest’ AssertionError: Timer has reached zero but didn’t switch back to Session time.: expected ‘Rest’ to not equal ‘Rest’
It is strange as visually when the timer reaches 00:00, ‘Work hard’ switches to ‘Rest’ and vice-versa.
I think it may be due to how components/state update asynchronously…
Any ideas? Please don’t mind the UI as I’m focusing on the logic first.
Yup and I had the same issue with the calculator although I managed to pass the test using: ReactDOM.render(<App />, document.getElementById('root'))
instead of : const root = ReactDOM.createRoot(document.getElementById('root')); root.render( <React.StrictMode> <App /> </React.StrictMode> );
I’m using the ReactDOM.render as well with my clock but this does not seem to solve it unfortunately.
Do you know how I can use React 17 in CodePen? It seems only version 18 is available in Add External Script…
Thanks, I did try with React 17,16 and 15 but to no avail.
Currently testing with React 15 and if I run multiple tests in a row, I obtain different scores each time, first one 28/29 passed, then 26/29 passed then 27/29 passed, and this without changing a single line in my code.
The tests I fail are 13,14,15. Or a mix of these depending on the mood of the automated test