Tests for 25+5 clock... #time-left test

I am having trouble with the tests for element #time-left in the 25+5 clock. I am rendering to a <span> element as shown below(I’ve also tried div and h1 as elements) For the life of me I cant figure out what the unit tests don’t like. Any help is appreciated.

<span id="time-left" ><Time sRemain={this.state.remain} /></span>

function Time(props) {
  return (("00" + (Math.floor(props.sRemain / 60).toString())).slice(-2) + ":" + (("00" + ((props.sRemain % 60).toString())).slice(-2)));

This is the the whole pen https://codepen.io/avatar414/pen/vYJeKaQ

So when I look at the error message, I see:

time-left is not formatted correctly: expected ‘25’ to equal ‘60’

This suggests to me that the issue is when I increment session length, the timer doesn’t update.


As you can see, I bumped the session to 33 but the timer did not update.

In the example project, it does. :slightly_smiling_face:

And I specifically wrote in it so that it didnt until the next cycle :rofl: Thanks I’ll try that

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