MCPcopy Index your code
hub / github.com/simstudioai/sim / createTestContext

Function createTestContext

apps/sim/executor/variables/resolvers/workflow.test.ts:22–33  ·  view source on GitHub ↗

* Creates a minimal ResolutionContext for testing. * The WorkflowResolver only uses context.executionContext.workflowVariables, * so we only need to provide that field.

(workflowVariables: Record<string, any>)

Source from the content-addressed store, hash-verified

20 * so we only need to provide that field.
21 */
22function createTestContext(workflowVariables: Record<string, any>): ResolutionContext {
23 return {
24 executionContext: {
25 workflowVariables,
26 workspaceId: 'workspace-1',
27 workflowId: 'workflow-1',
28 executionId: 'execution-1',
29 },
30 executionState: {},
31 currentNodeId: 'test-node',
32 } as ResolutionContext
33}
34
35describe('WorkflowResolver', () => {
36 describe('canResolve', () => {

Callers 1

workflow.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected