Skip to content

assert_maps_equal should have a default third argument #30

@fabio-t

Description

@fabio-t

I think this

defmacro assert_maps_equal(left, right, keys_or_comparison) do
should have a sensible default:

if nothing is passed as keys, assume exact equivalency

  • assert_lists_equal Map.keys(left), Map.keys(right) at the beginning
  • then the deeper check key by key

if :left is passed as third argument, should convert to Maps.keys(left) and equivalently for right

Or something along those lines. What do you think? Would a PR in this sense be useful/appreciated?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions