Do you put tests outside the `tests/` folder?

Currently the commands looks like:

elm-test src/**/ChiSquared.spec.elm

To get all files that need to be tested I’ve used glob. Some time ago I wrote a CLI tool (using typescript) to automate some angular processes - and it was general enough to work with elm.

(the basic idea was that some modules - which in my case deal with math can be easily moved with test attached)

P.S. I consider my approach a hack - but since the number of modules that I test is fairly small it generally works ok.

P.P.S. Angular applications have a config file (or more generally they use a typescript config file) to tell which files you want to test, it looks like this:


“include”: [
“src/**/*.spec.ts”,
“src/**/*.d.ts”
]

The above is the default, that is usually never changed, since the angular CLI tool automatically creates .spec.ts files. (I like the glob approach, because it allows you to organise your code in both the modular way and in the more traditional “test” folder way)