Skip to content

Detect when we run tests twice #506

Description

@harrysarson

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions