elm-explorations / elm-explorations/test

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

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

Description

To reproduce:

```elm
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 `` 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)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.