brian-watkins/elm-spec/1.0.1

NOTE: the latest version is 3.3.2

Spec.Time

Functions for working with time during a spec.

Set Up at a Time

withTime : Int -> Setup model msg -> Setup model msg

Set up the scenario at a particular time.

Provide the number of milliseconds since the UNIX epoch.

withTimezoneOffset : Int -> Setup model msg -> Setup model msg

Set up the scenario at a particular timezone offset.

Provide the timezone offste in minutes.

Pass the Time

tick : Int -> Context model -> Command msg

A step that simulates waiting for some number of milliseconds to pass.

Any subscriptions that depend on the passage of time will be triggered as expected.

nextAnimationFrame : Context model -> Command msg

A step that simulates waiting for the next animation frame.

Any subscriptions that depend on animation frame updates will be triggered as expected.