expect (Function)

Signature: expect(actual: any, expected: any) -> Unit

Description: Asserts two values are equal by canonical rendering. Success payloads compare by value; Errors remain visible as Error(message). On mismatch, marks the enclosing test failed and prints a diagnostic; execution continues.

Parameters

  • actual (any): The computed value
  • expected (any): The value it should equal

Returns: Unit

Example

test("doubling", fn() => expect(21 * 2, 42))
test ("doubling", \() => expect (21 * 2, 42))