I have to arrays in javascript. Equality comparison on the elements with both === and == succeeds. But when I do a deep equals on the arrays with chai, I keep getting failure.
What am I doing wrong? Why is one array showing the element as a string. Clearly it's not actually a string, right? Otherwise the === operator would fail.
The type of the elements in the arrays is mongoose ObjectId.
The arrays:
A: ["57af9c0623a2c3b106efa7a8"]
B: [ 57af9c0623a2c3b106efa7a8 ]
A[0] === B[0] // true
The line which fails:
expect(A).to.eql(B);