-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
I'm storing some data inside the model that I would like to use on the tests to compute some values.
For example, I'm storing the currentDate inside the model, and later on I need the currentdate to mock an HTTP response.
So I would like to be able to do something like:
start
|> ProgramTest.withModel
(\model ->
ProgramTest.simulateHttpOk "POST" mockUrl (responseSuccess model.currentDate)
)
|> ProgramTest.clickButton "button"
|> ProgramTest.expectViewHasNot [ Selector.id "test-id" ]The signature of the function could be something like:
withModel : (model -> ProgramTest model msg effect -> ProgramTest model msg effect) -> ProgramTest model msg effect -> ProgramTest model msg effectWhat do you think? If you agree I could even open a PR myself :)
Metadata
Metadata
Assignees
Labels
No labels