Use these functions and types to create the program that will run the spec suite.
Create a spec suite program for describing the behavior of browser-based programs.
Once you've created the Config value in your Runner module, I suggest adding a function like so:
program : List (Spec model msg) -> Program Flags (Model model msg) (Msg msg)
program =
Spec.Runner.browserProgram configThen, each of your spec modules can implement their own main function:
main =
Runner.program
[ ... some specs ...
]The JavaScript runner will find each spec module and run it as its own program.
Create a spec suite program for describing the behavior of headless programs.
Once you've created the Config value in your Runner module, I suggest adding a function like so:
program : List (Spec model msg) -> Program Flags (Model model msg) (Msg msg)
program =
Spec.Runner.program configThen, each of your spec modules can implement their own main function:
main =
Runner.program
[ ... some specs ...
]The JavaScript runner will find each spec module and run it as its own program.
Represents a message to pass between elm-spec and the JavaScript elm-spec runner.
Flags that the JavaScript runner will pass to the spec suite program.
Used by the spec suite program.
Used by the spec suite program.
The spec suite runner must provide a Config, which must be implemented as follows:
Create two ports:
And then create a
Configlike so:The
sendandoutletattributes must reference the same port,elmSpecOut.