elm-program-test
elm-program-test copied to clipboard
Test Elm programs
- [ ] write a rule that makes sure all `expect*`/`ensure*` functions match one another - [ ] write a rule that makes sure all `SimulatedEffect.*` modules match their parallel...
- [ ] `SimulatedEffect.Random.generate` - [ ] ProgramTest will just keep a random seed and step it for each generate - [ ] if there's a ProgramTest.withInitialTime, the initial seed...
Ideally simulating `cancel` should record that the request was cancelled so that that information can be shown in error messages.
The browser history is already maintained in the ProgramTest model (inspectable with `expectBrowserUrl` and `expectBrowserHistory`). This issue would add `back` and `forward` to `SimulatedEffect.Navigation` to parallel the functions in https://package.elm-lang.org/packages/elm/browser/latest/Browser-Navigation...
- [ ] add `SimualtedEffect.Time.every` - [ ] complete tests for interacting with `advanceTime` Probably for now it's not necessary to accurately simulate the specific behavior of the Time effect...
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`....
NOTE: a PR that adds this should also include a new example in `examples/` that demonstrates a minimal app with drag and drop with realistic tests. Accessibility guidelines: https://www.w3.org/wiki/PF/ARIA/BestPractices/DragDrop Initial...
What would someone want to assert when testing programs that use Browser.Dom?
For #40