📦
toContainEqual
Check if something contains something using strict equality
This comparison is used to determine if a reference contains a reference that equals another reference.
All the values returned by
T[index]
will be compared using the ==
operator, and if that comparison does not work, a memcompare will be used. Overloading the class @operator("==")
can be used in conjunction with this comparison. The index
must be a number value, and there must be a length
property that matches the index
type. All values from 0
to length - 1
will be checked.const reference = new Vec3(1, 2, 3);
const data = new Array<Vec3>(0);
data.push(new Vec(0, 0, 0));
data.push(new Vec(1, 2, 3));
data.push(new Vec(4, 5, 6));
expect<Uint8Array>(data).toContainEqual(reference);
This method is portable with
jest
using the toContainEqual()
method.Last modified 3yr ago