rtfeldman/node-test-runner

Detect when we run tests twice

Opened this issue · 0 comments

It is very easy to run a test twice:

module Main exposing (..)

import Test exposing (Test)
import Expect

a =
   Test.test "a" (\_ -> Expect.pass)

b =
   Test.test "b" (\_ -> Expect.pass)

tests : Test
tests =
    Test.describe "blah blah"
        [ a
        , b
        ]

Will run a and b twice:

Compiling > Starting tests

elm-test 0.19.1-revision6
-------------------------

Running 4 tests. To reproduce these results, run: elm-test --fuzz 100 --seed 148067075282531


TEST RUN PASSED

Duration: 121 ms
Passed:   4
Failed:   0

This is wasteful, I wonder if we can detect this and give a helpful warning (probably an error next MAJOR release)