chai compare array with deep equal code example
Example 1: chai compare arrays
expect([1, 2, 3]).to.eql([1, 2, 3]) // don't use `equal`
Example 2: chai expect array without order
expect([2, 1, 3].sort()).to.eql([3, 1, 2].sort())
expect([1, 2, 3]).to.eql([1, 2, 3]) // don't use `equal`
expect([2, 1, 3].sort()).to.eql([3, 1, 2].sort())