I am currently doing the front-end-5 pomodoro clock.I used the easytimer.js for this project.My website is working as intended but test #8 is not passing.
8. I can see an element with corresponding id=“time-left”. NOTE: Paused or running, the value in this field should always be displayed in mm:ss format (i.e. 25:00).
The reason given out for not passing this test is :
Timeout of 2000ms exceeded. For async tests and hooks, ensure “done()” is called; if returning a Promise, ensure it resolves.
Due to this my 8 other tests are not passing because it is unable to detect the content in the time-left element.
u/ckujawa made same post about this problem but there were no replies to the post.
This is my #time-left element.timeLeft
is a variable which tracks the time left in seconds .
<div id="time-left">
{Math.floor(timeLeft / 60) < 10 && "0"}
{Math.floor(timeLeft / 60).toString()}:
{timeLeft - Math.floor(timeLeft / 60) * 60 < 10 && "0"}
{(timeLeft - Math.floor(timeLeft / 60) * 60).toString()}
</div>
This is the link for my whole code.I should have seperated the code into different files but I just wanted to complete the project fast so i didn’t do it.
Image of working project: