Skip to main content

assertEqual

Validates that the given expected value is equal to actual. An optional custom failureMessage can be given for displaying should the validation fails.

assertEqual(expected, actual)
# Or
assertEqual(expected, actual, failureMessage)

Parameters#

  • expected: The expected value
  • actual: The actual value
  • failureMessage: An optional string message to show when validation fails

Returns#

  • No value

Example#

assertEqual(10, 5 * 2)