Function When_I_advance_timers_by_seconds

  • When I advance timers by seconds:

    When I advance timers by {int} seconds
    

    Moves the clock the specified number of seconds. Any timers within the affected range of time will be called.

    Parameters

    • seconds: number

    Returns void

    Tick the clock time by 3 seconds:

    When I advance timers by 3 seconds
    

    Tick the clock time by 1 second:

    When I advance timers by 1 second
    

    A preceding step "When I use fake timers" is required. For example:

    When I use fake timers
    And I advance timers by 3 seconds