chai icon indicating copy to clipboard operation
chai copied to clipboard

Unordered comparison of nested and doubly nested arrays

Open bbhopesh opened this issue 4 years ago • 1 comments

All the arrays in my object are meant to be sets, so while comparing multiple objects, I want every array comparison to be unordered. Many times these arrays are nested. I was sondering if there is an easy way to accomplish this with chai. Here is a sample structure:

{
  "a" : "val",
  "set" : [{"a",.....,"innerset" : [....]}, {....}],
... other sets and nested sets.
}

bbhopesh avatar Apr 06 '20 07:04 bbhopesh