Search code examples
elmelm-test

Change tests directory in elm test?


I'm using Java and Maven to build my server application (see github) and typically you place source code in the folder src/main/<language> and tests in src/test/<language>.

With Elm I'm using elm-explorations/test to run my tests (since I'm using Elm 0.19) but I cannot seem to find a way to change the test folder to src/test/elm instead of tests.

I've tried for example changing elm.json and adding:

"test-directories": [
    "src/test/elm"
  ]

but this doesn't seem to work. So my question is:

How can I change the folder where elm-test assumes the tests to be located?


Solution

  • The tests folder is hard-coded in https://github.com/rtfeldman/node-test-runner/blob/master/lib/elm-test.js, I'm not sure what the reason is.

    As a possible work-around you could create a tests symlink to your folder.