Skip to content

improve test assertions #10

Description

@gabririgo

src/llm/client.ts

Comment on lines +2492 to +2500

      let amountIn = (args.amountEth as string) || "";
      const amountOut = (args.amountOut as string) || "";

      // Reject ambiguous input: only one of amountEth or amountOut may be provided.
      if (amountIn && amountOut) {
        throw new Error(
          "Provide amountEth (native token input) OR amountOut (token output to receive), not both."
        );
      }

The refresh_oracle_feed tool now has several new branches (amountOut-based estimation, viaVault routing, EOA simulation/estimateGas, and defaulting amountEth to 0.001). There are existing unit tests for other src/llm/client.ts helpers, but none exercising this tool’s argument validation and branching; adding targeted tests would help prevent regressions (e.g., amountEth+amountOut rejection, amountOut requires vault+RPC, viaVault requires vault, negative/zero oracle estimates).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions