elm-explorations / elm-explorations/test
"Contains multiple tests named myFirstTest" error
- Dominant language
- Elm
- Stars
- 244
- Forks
- 40
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 2
Description
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`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.