elm-explorations / elm-explorations/test

Test.only should be multiplicative instead of additive

Open
#253 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Elm
Stars
244
Forks
40
Avg merge
1d 23h
Merged PRs (30d)
2

Description

```elm
suite1 =
Test.only <|
Test.describe "foo"
[ Test.test "Abc" <| \() -> Expect.pass
, Test.only <|
Test.test "Def" <| \() -> Expect.pass
]

suite2 =
Test.describe "bar"
[ Test.test "Ghi" <| \() -> Expect.pass
]
```

This should result in only `Def` being run, but it results in both `Abc` and `Def` being run, because `Test.only` in a sense uses set union instead of set intersection.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the nested Test.only example from the issue and compare the runs from suite1 and suite2. Inspect the implementation of Test.only and its handling of nested test selections; done means only Def runs when the outer and inner selections are combined, with coverage for this example.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.