Skip to main content
Glama

mcp-google-sheets

flow-with-response.test.ts1.59 kB
import { FlowRunStatus } from '@activepieces/shared' import { ExecutionVerdict, FlowExecutorContext } from '../../src/lib/handler/context/flow-execution-context' import { flowExecutor } from '../../src/lib/handler/flow-executor' import { buildPieceAction, generateMockEngineConstants } from './test-helper' describe('flow with response', () => { it('should execute return response successfully', async () => { const input = { responseType: 'json', fields: { status: 200, headers: { 'random': 'header', }, body: { 'hello': 'world', }, }, respond: 'stop', } const response = { status: 200, headers: { 'random': 'header', }, body: { 'hello': 'world', }, } const result = await flowExecutor.execute({ action: buildPieceAction({ name: 'http', pieceName: '@activepieces/piece-webhook', actionName: 'return_response', input, }), executionState: FlowExecutorContext.empty(), constants: generateMockEngineConstants(), }) expect(result.verdict).toBe(ExecutionVerdict.SUCCEEDED) expect(result.verdictResponse).toEqual({ reason: FlowRunStatus.SUCCEEDED, stopResponse: response, }) expect(result.steps.http.output).toEqual(response) }) })

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server