avh4 / avh4/elm-program-test

Consider alternate names for "SimulatedEffect"

Open
#170 0 comments 1 reaction 0 assignees View on GitHub
discussion semver: major
Dominant language
Elm
Stars
95
Forks
28
PR merge metrics
No merged PRs in 30d

Description

The current name "SimulatedEffect" have been confusing to some users because the `simulateEffects` function you provide when creating a ProgramTest doesn't actually simulate the effects at the moment that it's called -- it actually is just interpreting your `Effect` type into something that elm-program-test can understand. Specifically, this is very different from simulating the response to effects, like simulating HTTP responses, which seems to be what some users more naturally think of "simulating" to refer to.

My thoughts from the Slack thread:
> maybe better names for things would be
> - `InspectableCmd` instead of `SimulatedEffect`
> - `toInspectableCmd` instead of `simulateEffects`, and the type is `effect -> InspectableCmd msg`

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the public ProgramTest API around `SimulatedEffect`, `simulateEffects`, and the proposed `InspectableCmd` and `toInspectableCmd` names. Read the issue and its quoted Slack discussion first; done means reaching agreement on the terminology and identifying the complete API surface that would need the chosen rename.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm
Domain
testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.