{
  "id": "fn-test-expect_equal",
  "dataComponent": "test",
  "heading": {
    "title": "expect_equal",
    "badges": [
      "Testing",
      "Assert"
    ]
  },
  "synopsis": "Asserts that the actual value is equal to the expected value, otherwise raises an error that halts the script or test suite.",
  "codeBlocks": [
    "extend(\"array\")\\nextend(\"string\")\\n\\ndescribe(\"example math & array\", () => {\\n  it(\"should perform simple addition\", () => {\\n    expect_equal( 2 + 2, 4 )\\n  })\\n\\n  it(\"should map numbers in an array\", () => {\\n    expect_equal(\\n      array:map(x => x * 2, [1,2,3]),\\n     [2,4,6]\\n    )\\n  })\\n})"
  ],
  "notes": [
    "If the actual value differs from the expected value, expect_equal throws an error that stops execution of the current test (and possibly the entire script).",
    "This is useful for verifying behavior in small 'it(...)' test blocks.",
    "There is no partial usage for expect_equal—it always takes exactly two arguments: (actual, expected)."
  ]
}
