Build a Pomodoro Clock: didn't manage to validate all US

Hi everyone! I encounter some problem to validate all US from the Podomoro project.
I don’t understand why i my code doesn’t pass US 7,10,20,21,22,23,24,25
Do you have any idea ?

Thank you in advance !
Here my code:

const initialState = () => {
  return {
    breakLength: 5,
  sessionLength: 25,
  duration: moment.duration(25, "minutes"),
  startStop: "Start",
    display:"Session",
    currentTime: 0

         }
};


var interval;

const timer = (time) => {
  
  var myVar = setInterval(time.subtract(moment.duration(1000)), 1000)
}

class App extends React.Component {
  constructor(props){
    super(props);
    this.state = initialState();
    this.handleReset = this.handleReset.bind(this)
    this.incrementDecrement = this.incrementDecrement.bind(this)
    this.time = this.time.bind(this)
  }
  
  handleReset() {
    this.setState(initialState);
    clearInterval(interval);
    this.audio.pause();
    this.audio.currentTime = this.state.currentTime;
    
    
  }
  
  incrementDecrement(event) {
    if (event.target.id == "break-decrement" && this.state.breakLength > 1){
      this.setState({
        breakLength: this.state.breakLength - 1
      })
    }
    else if (event.target.id == "break-increment" && this.state.breakLength <= 59){
      this.setState({
        breakLength: this.state.breakLength + 1
      })
    }
      
    else if (event.target.id == "session-increment" && this.state.sessionLength <= 59){
      this.setState({
        sessionLength: this.state.sessionLength + 1
      })
    }
    
       
    else if (event.target.id == "session-decrement" && this.state.sessionLength > 1){
      this.setState({
        sessionLength: this.state.sessionLength - 1
      })
    }
       
  }
  
  time() {
    if(this.state.startStop == "Start"){
     this.setState({
       startStop: "Stop"
     });
      this.audio.currentTime = this.state.currentTime;
      interval =  setInterval(
      () => {
        
        if (this.state.duration > moment.duration(0)) {
          this.setState({
        duration: this.state.duration.subtract(1000), 
            
    })
        }
         else {
           this.audio.play()
           this.setState({
       startStop: "Stop",
       sessionLength: this.state.sessionLength - 1,
       duration: initialState().duration      
            })
           if (this.state.sessionLength <= 1){
             this.setState({
        display: "New break as begun",
        breakLength: this.state.breakLength - 1,
        sessionLength: initialState().sessionLength
      })
           }
        
          }
        
      
      },
      1000
      
    )
    }
    else {
      clearInterval(interval);
      this.setState({
        startStop: "Start"
      })
    }
  
    
  }
  

    render() {
      return (
        <div>
          <div id="break-label">Break Length</div>
          <div id="session-label">Session Length</div>
          <button id="break-decrement" onClick = {this.incrementDecrement}>Break decrement</button>
          <button id="session-decrement" onClick = {this.incrementDecrement}>Session decrement</button>
          <button id="break-increment" onClick = {this.incrementDecrement}>Break increment</button>
          <button id="session-increment" onClick = {this.incrementDecrement}>Session increment</button>
          <div id="break-length" onChange = {this.handleEnd}>{this.state.breakLength}</div>
          <div id="session-length" onChange = {this.handleEnd}>{this.state.sessionLength}</div>
          <div id="timer-label">{this.state.display}</div>
          <div id="time-left">{moment(this.state.duration._data).format('mm:ss')}</div>
          <button id="start_stop" onClick = {this.time}>{this.state.startStop}</button>
          <button id="reset" onClick = {this.handleReset}>Reset</button>
          <audio id="beep" src="https://www.pacdv.com/sounds/interface_sound_effects/beep-11.wav" ref={ref => this.audio = ref}></audio>
        </div>
      )
      
      
    }
    
  
}

ReactDOM.render(<App />, document.getElementById("main"));

Welcome to the forums @fassotguillaume. It’s easier for those that want to help if you provide a link to your codepen, jsfiddle or repl.it