* Creates a mock execution context with workspaceId for tool tests.
(overrides?: Partial<ExecutionContext>)
| 368 | * Creates a mock execution context with workspaceId for tool tests. |
| 369 | */ |
| 370 | function createToolExecutionContext(overrides?: Partial<ExecutionContext>): ExecutionContext { |
| 371 | const ctx = createExecutionContext({ |
| 372 | workflowId: overrides?.workflowId ?? 'test-workflow', |
| 373 | blockStates: overrides?.blockStates, |
| 374 | executedBlocks: overrides?.executedBlocks, |
| 375 | blockLogs: overrides?.blockLogs, |
| 376 | metadata: overrides?.metadata, |
| 377 | environmentVariables: overrides?.environmentVariables, |
| 378 | }) |
| 379 | return { |
| 380 | ...ctx, |
| 381 | workspaceId: 'workspace-456', |
| 382 | ...overrides, |
| 383 | } as ExecutionContext |
| 384 | } |
| 385 | |
| 386 | /** |
| 387 | * Sets up environment variables and returns a cleanup function. |
no test coverage detected