8

When I try

expect([1,2]).to.equal([1,2])

I get

AssertionError: expected [ 1, 2 ] to equal [ 1, 2 ]

probably due to object comparison?

Michael Durrant
  • 93,410
  • 97
  • 333
  • 497

1 Answers1

26

Use deep for a deep copy of actual attributes, e.g.

expect([1,2]).deep.to.equal([1,2]);


passes
Michael Durrant
  • 93,410
  • 97
  • 333
  • 497