I recently spent quite a few minutes struggling with this error:
The tests 'Tests' contain multiple tests named 'my first test'. Let's rename them so we know which is which.
The reason is because elm-test init initializes your test module with module Tests exposing (..) and an example suite, and I had modified the suite to be concat [ myFirstTest ]. Because elm-test generates code that imports every exported Test, the generated code looked like describe "Tests" [ suite, myFirstTest ], so myFirstTest was getting included and run twice without my understanding.
I think it would be nice if https://package.elm-lang.org/packages/elm-explorations/test/latest explained that every exported Test in your module will be run. Alternately, perhaps the first test could have a name other than suite so as to promote the idea that you need not group everything under a single toplevel suite.
I recently spent quite a few minutes struggling with this error:
The reason is because
elm-test init
initializes your test module withmodule Tests exposing (..)
and an examplesuite
, and I had modified thesuite
to beconcat [ myFirstTest ]
. Becauseelm-test
generates code that imports every exported Test, the generated code looked likedescribe "Tests" [ suite, myFirstTest ]
, somyFirstTest
was getting included and run twice without my understanding.I think it would be nice if https://package.elm-lang.org/packages/elm-explorations/test/latest explained that every exported Test in your module will be run. Alternately, perhaps the first test could have a name other than
suite
so as to promote the idea that you need not group everything under a single toplevelsuite
.