Pomodoro Clock - test #11 fails


I am banging my head against the wall with the Pomodoro clock, I cannot get pass test

  • 11. If the timer is paused and I click the element with id=“start_stop”, the countdown should resume running from the point at which it was paused.

As far as I see and understand, the countdown does stop and resume in my app as it should.

My code is here, Pomodoro clock related file is in src/App.js

Thanks in advance for any help! :slight_smile:

EDIT: Previous repl.it was not working, corrected the link

I noticed that my link to the project was not working. Updated the original post with a working link to the project. Still have not been able to solve the issue.

Having a similar issue, code looks very similar as well…

If I get an answer that is helpful, I will try to help out if i can.

Hey rahrahrah,

I did notice earlier that you’re struggling with the same issue and was reviewing your code. It is a very similar approach and but still I couldn’t come up with any solutions.

Thanks for looking… I am going to make an identical pen, to fiddle with and hopefully I will figure something out. Still not certain what the issue is though.

Hi nikalsson,

I figured mine out… I had the placement of my subtraction wrong when adjusting the time display. I will take a peek at yours when I have some additional time this evening. Good luck!

for react code, i think
or https://codesandbox.io/
are better IDE

i click run on repl … it compiles but it doesnt seem to load or im missing something :slight_smile:

rahrahrah: Thanks for the update, I’ll try to check out the time display of my project. Do you have an updated version of your code publicly available?

moigithub: For me the repl runs fine, I had problems with the stackblitz since I could not drag and drop files to there. That seems to be a common issue. But here’s my code on codesandbox: https://codesandbox.io/s/festive-greider-6nv93?fontsize=14&hidenavigation=1&theme=dark

EDIT: tried a bit of modification to the code in the codesandbox. Modified the format of the #time-left but that did not solve anything.

I finally had the time and interest to look at this problem again. And now I managed to solve it as soon as I opened the file. The problem was that when I pressed the ‘Reset’ button, I did not clear the call clearInterval(this.timer). So when then the timer was reset and started again it always added new interval to tick every second. That’s why the tests were also running so very fast. I always just assumed that the tests ran very fast to speed up the testing.

Anyway the I updated my code in the codesandbox. Maybe it will be useful for someone. Link in the post above.