jgrenat/regression-testing/1.0.0

RegressionTest.Runner

Exposes a bunch of methods to run tests based on generated test data.

Definition

{ initialModel : String
, messages : List String
, expectedOutput : String
}

Test data to test a update function

Test a program

{ modelDecoder : Decoder model
, messageDecoder : Decoder msg
, update : msg -> model -> model
}
-> List UpdateFunctionTestData
-> Test

Test the update function of a sandbox program, following the form msg -> model -> model, then compare the results to the saved results.

{ modelDecoder : Decoder model
, messageDecoder : Decoder msg
, update : msg -> model -> ( model, Cmd msg )
}
-> List UpdateFunctionTestData
-> Test

Test a regular update function, following the form msg -> model -> (model, Cmd msg), then compare the results to the saved results. The command part is not tested, only the model is kept.