drathier / elm-test-tables

Elm-test with table-driven tests. Your primary defence against regressions.
https://package.elm-lang.org/packages/drathier/elm-test-tables/latest/
MIT License
4 stars 1 forks source link

Run only a specific testTable row #8

Open drathier opened 5 years ago

drathier commented 5 years ago

Something like:

testTableAt n str lst =
    testTable str (lst |> List.drop (n - 1) |> List.take 1)

Make sure the displayed error text still refers to the correct line number, including ignored lines. Filtering out the list naively, like done above, makes the error say "1st table test row" all the time.

Also make sure this marks the test suite as partial, e.g. implement this using skip or only. Probably only, since when would you otherwise want to skip rows?