Ad
  • Custom User Avatar

    expect(your_func(array1, array2)).to.deep.equal(array2)

    The problem is if you compare [1] === [1] it will result as false. So you have to tell the test suite to compare individual elements of the array, not array itself. Becasue var a = [1] and var b = [1] are two different arrays (they have different reference to the memory).