Pomodoro Clock not passing tests

I’m having a hard time getting my Pomodoro Clock to pass 3 tests:

  1. When a session countdown reaches zero (NOTE: timer MUST reach 00:00), and a new countdown begins, the element with the id of “timer-label” should display a string indicating a break has begun.
  1. 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.
  1. 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.

But weirdly, it DOES pass:

  1. When a break countdown reaches zero (NOTE: timer MUST reach 00:00), and a new countdown begins, the element with the id of “timer-label” should display a string indicating a session has begun.

My timer does reach ‘00:00’ and a break countdown will start when a session finishes and vice versa. As far as I can tell, my clock does all of the things.

Can anyone tell me what I’ve missed?

I can’t tell you what your missing since I don’t understand JS well enough to do so. I can however tell you how you can sollute it yourself if your open to it.
1 go over the course/check w3schools course again. for me not being able tto finish it means i am lacking somewhere.
2 search for other project that are simulair to yours you can’t be the first one with this problem

Hello Sophieihpos, I think you might be having the same issue I had. I am trying to review your code, but you probably know where things are better then me. What I believe is happening is one of your if statements is setting the state prior, to your labels and then somewhere else I believe you have setting state again. Though the test only checks the state on the first state change if that makes sense. That is why I believe you can use variables to make and hold the changes and setState only once at the end which will set everything properly.

Now if that doesn’t work, it could be 1 second off when it takes into account of checking it with the tester. If you need help I will try to help as much as I can, good luck.