25 + 5 clock failing test

It works just fine until I run the tests. I have no idea why it stops working with the test running but for some reason it skips the function that changes the mode from ‘SESSION’ to ‘BREAK’ but still resets the time somehow.

fails #timer test 12

code: https://github.com/saidg23/timer
live demo: https://saidgarcia.com/timer/
Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Raspbian Chromium/78.0.3904.108 Chrome/78.0.3904.108 Safari/537.36.

Challenge: Build a 25 + 5 Clock

Link to the challenge:

EDIT: Fixed issue. Test expects you to use setInterval to set the time

This might be why, but I’m not sure. You shouldn’t be able to hit any increase/decrease buttons while the timer is running, but you’re able to in your program. Not sure if that’s what causing this issue, but it is an issue.

I have since fixed that and it wasn’t the problem, it turns out the test expects you to used setInterval() to count the time and I was doing calculating the difference in time between intervals.

anywho, thanks for taking a look