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

Function createBlock

apps/sim/lib/workflows/autolayout/utils.test.ts:18–35  ·  view source on GitHub ↗
(
  id: string,
  type: string,
  position: { x: number; y: number },
  overrides: Partial<BlockState> = {}
)

Source from the content-addressed store, hash-verified

16}))
17
18function createBlock(
19 id: string,
20 type: string,
21 position: { x: number; y: number },
22 overrides: Partial<BlockState> = {}
23): BlockState {
24 return {
25 id,
26 type,
27 name: id,
28 position,
29 subBlocks: {},
30 outputs: {},
31 enabled: true,
32 layout: { measuredWidth: 250, measuredHeight: 120 },
33 ...overrides,
34 } as BlockState
35}
36
37beforeEach(() => {
38 mockGetBlock.mockReturnValue(null)

Callers 1

utils.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected