rtfeldman / rtfeldman/node-test-runner

Detect when we run tests twice

Open
#506 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
140
Forks
83
Avg merge
8h 25m
Merged PRs (30d)
5

Description

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)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the elm-test runner behavior illustrated in the issue, using the duplicated a and b suite as the reproduction case. Determine how duplicate execution should be detected and reported; done means the example no longer runs four tests and produces the proposed helpful warning or error.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm, javascript
Domain
testing, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.