When comparing two arrays for equality, use
== does not compare arrays for value equality, but for reference equality.
This gives us the following counter-intuitive behaviour:
Array(1) == Array(1) // res0: Boolean = false
sameElements, on the other hand, has the behaviour you’d expect:
Array(1) sameElements Array(1) // res1: Boolean = true
Array(1).deep == Array(1).deep // res2: Boolean = true
This is not the preferred solution because it’s slightly more expensive, creating instances that will be discarded immediately.