Skip to content

Add CLI option for custom entrypoint module#2

Open
jivagoalves wants to merge 1 commit intolaszlopandy:masterfrom
jivagoalves:ja_add_cli_option_for_custom_entrypoint_module
Open

Add CLI option for custom entrypoint module#2
jivagoalves wants to merge 1 commit intolaszlopandy:masterfrom
jivagoalves:ja_add_cli_option_for_custom_entrypoint_module

Conversation

@jivagoalves
Copy link

Sometimes we want to use a different module than Main. For instance, we
may want to use a MainSpec module to run specs against our code base
with something like elm-spec.

module MainSpec where

import IO.IO exposing (..)
import IO.Runner exposing (Request, Response, run)

import Spec.Runner.Console as Console
import Spec exposing (..)

import CSVSpec

allSpecs =
    describe "App"
      [ CSVSpec.spec
      ]

testRunner : IO ()
testRunner = Console.run allSpecs

port requests : Signal Request
port requests = run responses testRunner

port responses : Signal Response

Sometimes we want to use a different module than `Main`. For instance, we
may want to use a `MainSpec` module to run specs against our code base
with something like [elm-spec](https://github.com/avh4/elm-spec).

```elm
module MainSpec where

import IO.IO exposing (..)
import IO.Runner exposing (Request, Response, run)

import Spec.Runner.Console as Console
import Spec exposing (..)

import CSVSpec

allSpecs =
    describe "App"
      [ CSVSpec.spec
      ]

testRunner : IO ()
testRunner = Console.run allSpecs

port requests : Signal Request
port requests = run responses testRunner

port responses : Signal Response
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant