🎭

toBe

or not.toBe(), that is the question
This comparison is used for comparing data using the == operator. In AssemblyScript this operator is used for comparing strings, numbers, and exact reference equality (or pointer comparison.)
For example, the following statements are valid toBe assertions:
let a = new Vec3(1, 2, 3);
// same reference
expect(a).toBe(a);
// integers are the same
expect(10).toBe(10);
// floats
expect(3.14).toBe(3.14);
// nullable references
expect<Vec3 | null>(null).toBe(null);
This method is safe to use portably with jest.