ProgramTest.advanceTime signature
- Dominant language
- Elm
- Stars
- 95
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
The ProgramTest.advanceTime function accepts an `Int` representing the number of milliseconds to advance the time by. However, both `Process.sleep`(in elm/core) and `SimulatedEffect.Process.sleep` take the number of milliseconds as a `Float`. I guess this is because the simulation time is stored as an `Int`, but does mean less than a millisecond, even though it is possible to sleep for that length of time.
I'm not sure if it is worth it to instead store the simulation time as a `Float` and then everything is just in floats. I could imagine some argument against that.
Final point, the documentation for `advanceTime` mentions `Task.sleep`, but it means `Process.sleep`.
Contributor guide
Research direction
Start by reading ProgramTest.advanceTime alongside Process.sleep in elm/core and SimulatedEffect.Process.sleep, then inspect the advanceTime documentation. Determine the intended time representation and API behavior for sub-millisecond sleeps; done means the behavior is consistent and the documentation names Process.sleep correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elm
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100