Left operand of the binary operation.
Typically represents the primary value being compared or operated upon. In business contexts, often represents actual values from captured API responses or business entities from previous operations.
Note: If you need to access object properties (like user.name
,
array.length
), use IPropertyAccessExpression as the left operand, not
IBinaryExpression.
Binary operator defining the operation type.
⚠️ IMPORTANT: These are computational/logical operators ONLY! ⚠️
🚨 CRITICAL JavaScript Requirements: 🚨
❌ NEVER use loose equality operators:
==
(loose equality) - This is NOT supported and causes type coercion
bugs!=
(loose inequality) - This is NOT supported and causes type coercion
bugs✅ ALWAYS use strict equality operators:
===
(strict equality) - Use this for all equality comparisons!==
(strict inequality) - Use this for all inequality comparisonsWhy strict equality is required:
"0" == 0
is true, but "0" === 0
is false)Do NOT include:
.
(dot) - This is property access, use IPropertyAccessExpression[]
(brackets) - This is element access, use IElementAccessExpression()
(parentheses) - This is function call, use ICallExpression.length
, .includes
, etc. - These are property/method access, use
IPropertyAccessExpressionComparison operators:
Arithmetic operators:
Logical operators:
AI selection guide:
Right operand of the binary operation.
Represents the comparison value, second operand in calculations, or second condition in logical operations. In business contexts, often represents expected values, business rule thresholds, or additional captured data from API responses.
Note: If you need to access object properties (like order.status
,
items.length
), use IPropertyAccessExpression as the right operand, not
IBinaryExpression.
Type discriminator.
Binary expression for operations between two operands.
Represents all binary operations including comparison, arithmetic, and logical operations. Essential for implementing business logic conditions, calculations, and validations in test scenarios using captured data.
🚨 CRITICAL: DO NOT confuse with property access or element access! 🚨
This interface is ONLY for binary operators (===, !==, +, -, etc.). Do NOT use this for:
❌ WRONG - These are NOT binary expressions:
Array.isArray
(use IPropertyAccessExpression instead)user.name
(use IPropertyAccessExpression instead)items[0]
(use IElementAccessExpression instead)x.y
(use IPropertyAccessExpression instead)object.property
(use IPropertyAccessExpression instead)console.log
(use IPropertyAccessExpression instead)Math.max
(use IPropertyAccessExpression instead)array.length
(use IPropertyAccessExpression instead)string.includes
(use IPropertyAccessExpression instead)✅ CORRECT - Binary expressions only:
x === y
(equality comparison)a + b
(arithmetic operation)count > 0
(comparison operation)isActive && isValid
(logical operation)For property/method access, use the appropriate expression types:
IPropertyAccessExpression
(e.g.,user.name
,Array.isArray
,array.length
)IElementAccessExpression
(e.g.,items[0]
,obj["key"]
)ICallExpression
withIPropertyAccessExpression
for the functionCommon AI mistakes to avoid:
.
) - this is property access, not a binary operator.length
,.includes()
, etc. - these are property/method accessE2E testing importance: Critical for implementing business rule validations, data comparisons, and conditional logic that reflects real-world application behavior using data captured from API responses.