Open axelson opened 2 weeks ago
Yes! This is a confusing one. I think we could implement this pretty tightly in the literal map matcher, doing a bit more set magic here.
Do you want to take a crack at it?
Yeah I'd like to, but no promises on when I'll get around to it. And thank you for the link to that snippet of code to get started.
No hurry on my end!
This assertion (and the reverse)
assert %{foo: "bar"} ~> %{"foo" => "bar"}
results in an unclear message:It's confusing because it looks like the same key is missing, but also unexpected. It might make sense to instead have a custom message in this case, maybe something like
.foo: The atom :foo was received, but the string "foo" was expected