Aggregate multiple duplicate descriptions at the same level#163
Aggregate multiple duplicate descriptions at the same level#163harrysarson merged 2 commits intoelm-explorations:masterfrom
Conversation
See #145 (its a bug in elm 0.19.1). |
|
|
||
| Ok childrenNames -> | ||
| if Set.member desc childrenNames then | ||
| Internal.ElmTestVariant__Labeled desc <| |
There was a problem hiding this comment.
This wrapper Test constructor is new right? What is the effect of adding it/what was missing before?
There was a problem hiding this comment.
There was a problem hiding this comment.
And in the case of describe and of duplicate child, the labels go one step further.
That's the effect, you can see it in the example output up in this thread
|
So if you can revert the |
CI failures :) |
|
Sorry, I've been away. Looks fine to me. |
|
ping @mpizenberg. Just waiting on elm-format so we can merge :) |
|
re-ping @mpizenberg :) |
|
I had forgotten about this ^^. Is there anything I have to do? |
|
Oh I have to elm-format the code? Let me look at this later today! |
|
Since it was kinda unrelated, I opened another PR for formatting in #170. |
|
@harrysarson it does not seem like the close/open trick will do it ^^. Maybe we wait for the switch to GH Action in #173 ? |
|
Let me rebase this. |
6f52515 to
4bbd944
Compare

Hi, following suggestions that it would be nicer to have all duplicates at once, I've come up with a possible implementation of this. Given the following tests:
Instead of getting the following elm-test output:
We are getting the following one:
You can notice that in the case of
concatanddescribe, both "should fail" and "should pass" duplicates are reported. And in the case ofdescribeand of duplicate child, the labels go one step further.To gather all duplicates, I simply aggregate them inside a
Setinstead of failing fast with aResult.andTheninfold.Side note, I had to remove the
Elm.Kernel.Debugimport to be able to compile, I'm not sure why.