What would you all think of changing the assert output when the argument to assert is match?(map, map) so that it shows the difference similar to if we did an ==, except the extra fields in the right-hand map would be omitted? This is what we currently see when using "assert match?(%{field1: "foo", field2: "bar"}, data)":
1) test map1 (MapPropsalTest)
test/map_propsal_test.exs:10
match (match?) failed
code: assert match?(%{field1: "foo", field2: "bar", field3: "not-there"}, map)
right: %{
field1: "foo",
field2: "bar",
inserted_at: ~N[2017-10-19 02:10:25.254692]
}
stacktrace:
test/map_propsal_test.exs:12: (test)
How I think it should read instead when the args to match? are both maps :
2) test map2 (MapPropsalTest)
test/map_propsal_test.exs:15
match (match?) failed
code: assert match?(%{field1: "foo", field2: "bar", field3: "not-there"}, map)
left: %{field1: "foo", field2: "bar", <red>field3: "not-there"</red>}
right: %{field1: "foo", field2: "bar"}
stacktrace:
test/map_propsal_test.exs:17: (test)
I'd be happy to do the work.