I dont know exactly off the top of my head, but I dont think I have to do anything special. My test module is usually something like this:
import Main exposing (main)
tests : Test
tests =
test "1 is 1" <| \_ -> Expect.equal 1 1
No real tests here, but it imports Main
, which means that everything in Main
and everything Main
imports will be searched for tests. So any test in any module will be run.
This has the extra benefit of compile errors cause my tests to fail. So usually when I am developing I just run and re-run the tests to see what my compile errors.