elm-explorations / test

Write unit and fuzz tests for Elm code.
https://package.elm-lang.org/packages/elm-explorations/test/latest
BSD 3-Clause "New" or "Revised" License
236 stars 40 forks source link

Using `hasNot` with `find` passes when it should fail #176

Open avh4 opened 2 years ago

avh4 commented 2 years ago

To reproduce:

Query.find [ tag "does-not-exist" ]
    >> Query.hasNot [ text "ALSO DOES NOT EXIST" ]

Actual result: it passes (because hasNot turns the find's failure into a success)

Expected result: it should fail because there is no <does-not-exist> tag in the HTML, and the hasNot shouldn't even come into play. (hasNot should only invert its own failure and not affect preceding steps in the query)

harrysarson commented 2 years ago

Eeek