Pomodoro not passing user story 11 but works when I try it myself

Tell us what’s happening:
The test for my Pomodoro clock clears all tests except for user Story 11 (about resetting the clock when the reset button is pressed) but when I try it myself it works fine. I wonder is there is something I need to do for the test to actually see that it’s been properly reset.

Default timer label was not properly reset : expected ‘Break’ to equal ‘pomodoro’

Your code so far
Check the code: https://github.com/LazaroFilm/pomodoro
Check the app: https://lazarofilm.github.io/pomodoro/

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.80 Safari/537.36.

Challenge: Build a 25 + 5 Clock

Link to the challenge:

useEffect is asynchronous, the tests might be executing faster than the state is being updated. You could try using useLayoutEffect instead, which is synchronous.

I did not test it, if that fixes it the problem is with the speed of the tests. A user won’t notice using useEffect which is recommended for most uses, but this might be a case where you need useLayoutEffect to pass tests.

Thanks That’s what I thought. The way I ended up doing it is adding a rule to the onClick action to directly change the label when I hit the reset button and that worked since that’s not asynchronous. Would be extrafluous for a normal app, but got around passing the test.