bpmn-server / ConnectorTesting
Interface: ConnectorTesting#
What a connector answers outside production (docs/docs/connectors.md#outside-production): only where APP_ENV is
development or test; production, or a server that does not say, always calls the real API.
- real (the default): the real API, as in production;
- examples: no call: each operation answers its document's example (else one made from its schema);
- sandbox: the same calls, to baseUrl (a sandbox of the API), with the same key.
answers, by operationId: an operation's own answer, in place of the example (examples): the answer itself, or
{ cases: [{ when, status, output }] }: the first case whose when its input matches (each value, as text; a
case without when matches any); a status other than 2xx fails as the API's would (HTTP_environments: where it applies, development and test (the default), or one of them.
Table of contents#
Properties#
Properties#
answer#
• answer: "real" | "examples" | "sandbox"
Defined in#
packages/bpmn-server/src/connectors/Connectors.ts:85
baseUrl#
• Optional baseUrl: string
Defined in#
packages/bpmn-server/src/connectors/Connectors.ts:86
answers#
• Optional answers: Record\<string, any>
Defined in#
packages/bpmn-server/src/connectors/Connectors.ts:87
environments#
• Optional environments: ("test" | "development")[]
Defined in#
packages/bpmn-server/src/connectors/Connectors.ts:88