Closed t3hmrman closed 3 years ago
This module largely matches node's assert
deep equality APIs - https://nodejs.org/api/assert.html#assert_assert_deepequal_actual_expected_message - which don't have an option to compare arrays unordered.
I think the first thing to try would be to see if node core will accept such an option.
Ah that's reasonable -- it probably doesn't make sense to add it here then until it's there, maybe this ticket could be reopened if/when that's considered
That sounds like a good plan. Please link the node core issue/PR here once you've filed it :-)
Would it be possible to offer an option to compare arrays by members rather than members+order? This is a weaker concept of equality but is sometimes useful when dealing with non-deterministically produced arrays.
I'm pretty sure the change would one or a few lines above the existing array case, but want to at least start the discussion first.