AutoBE
    Preparing search index...

    Expression statement for executing utility operations without value capture.

    IMPORTANT: For API operations, use IApiOperateStatement instead. This statement type is primarily for utility operations that don't require capturing return values, and where the operation's side effect or validation is more important than its return value.

    Common E2E testing scenarios:

    • Validation assertions using TestValidator predicates (when not using predicate expressions)
    • Utility function calls (console.log, debugging functions)
    • Non-API side-effect operations
    • Cleanup operations that don't involve API calls

    Note: For most validation cases, prefer using predicate expressions (IEqualPredicate, IConditionalPredicate, etc.) instead of expression statements with TestValidator calls.

    AI function calling usage: Select when the business action's execution is the goal, not data capture, and when the operation is NOT an API call.

    interface IExpressionStatement {
        expression: IExpression;
        type: "expressionStatement";
    }
    Index

    Properties

    Properties

    expression: IExpression

    The expression to be executed as a statement.

    Should NOT contain API function calls - use IApiOperateStatement for those instead.

    Typically represents utility operations:

    • TestValidator function calls (though predicates are preferred)
    • Console operations for debugging
    • Non-API utility function invocations
    • Side-effect operations that don't involve the API

    The expression's result is discarded, making this suitable for void-returning operations or when return values are not needed for subsequent test steps.

    Most commonly contains ICallExpression for utility invocations.

    type: "expressionStatement"

    Type discriminator.