metosin / metosin/testit

Using symbols in an =in=> value causes test to incorrectly succeed

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Clojure
Stars
45
Forks
6
PR merge metrics
No merged PRs in 30d

Description

```
(deftest reproducer
(facts "This correctly fails"
{:foo [1 2]} =in=> {:foo [1 3]})
(let [sym :foo]
(facts "This should fail, but succeeds"
{sym [1 2]} =in=> {sym [1 3]})))
```

Contributor guide

Open the contributing guide

Research direction

Start by running the supplied `deftest reproducer`, comparing the literal `:foo` case with the `sym` binding in the `facts` assertions. Trace how `=in=>` handles map keys and add a regression test so the symbol-key case fails correctly rather than succeeding.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.