hyperfiddle / rcf

RCF – a REPL-first, async test macro for Clojure/Script
MIT License
278 stars 12 forks source link

Maps are order sensitive when using wildcards #52

Closed slifin closed 2 years ago

slifin commented 2 years ago
(tests
  {:a "a" :b "b"} := {:b "b" :a "a"}
  {:a "a" :b "b"} := {:a "a" :b "b"}
  {:a "a" :b "b"} := {:b _ :a _}
  {:a "a" :b "b"} := {:a _ :b _})
❌
in {:a "a", :b "b"}

{:a "a", :b "b"}
:<>
{:b _, :a _}

I'm not sure if this is intended or not but this behavior can result in very brittle tests since maps are purely associative and order shouldn't be relied on by default

dustingetz commented 2 years ago

Thank you Adrian Duplicate of https://github.com/hyperfiddle/rcf/issues/48 Fixed in internal dev branch, technical alpha coming soon