Front End Development Libraries Projects - Build a 25 + 5 Clock - tests time out

Tell us what’s happening:
I can’t get the test to work - they time out.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15

Challenge: Front End Development Libraries Projects - Build a 25 + 5 Clock

Link to the challenge:

hello and welcome back to fcc forum :slight_smile:

apparently all of your “timer” related codes fails due to this fact that “test” are not able to “take over” by “tests script”

i also noticed you used “useCallback” method for your “timer”, is it worth it in this context? maybe try simply having a state updater without using a useCallback and see that fixes it

happy coding :slight_smile:

Thanks for your reply.

Unfortunately the suggested removal of useCallback did not fix the bug.

I saw that after i added Miliseconds to the code the test scripts stopped working, which seems odd as the millisecond precision is needed to get to exactly 00:00

lets try something like this, go one “use case” at a time from “timer section” and see where and why its giving this “timeout error”

happy coding :slight_smile:

Alright, i got it working by setting the timer so low that it could be completed before timeout.

Now i got an issue with the audio element. I can hear the sound playing when it reaches 00:00, but the tests says not sound is played.

Also the test can detect that the sound i longer than one second and that it stops playing when reset i pressed. So this seems very odd. Hope some updates are planned for the testing suite :slight_smile:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.