Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CLI option for custom entrypoint module #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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